Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos
Commits
3751597e
Commit
3751597e
authored
Mar 05, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix false success when requested instance is not ready.
parent
a91e558b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
slapos/recipe/request.py
slapos/recipe/request.py
+3
-6
No files found.
slapos/recipe/request.py
View file @
3751597e
...
@@ -119,6 +119,7 @@ class Recipe(object):
...
@@ -119,6 +119,7 @@ class Recipe(object):
self
.
_raise_request_exception
=
None
self
.
_raise_request_exception
=
None
self
.
_raise_request_exception_formatted
=
None
self
.
_raise_request_exception_formatted
=
None
self
.
instance
=
None
self
.
instance
=
None
# Try to do the request and fetch parameter dict...
try
:
try
:
self
.
instance
=
request
(
software_url
,
software_type
,
self
.
instance
=
request
(
software_url
,
software_type
,
name
,
partition_parameter_kw
=
partition_parameter_kw
,
name
,
partition_parameter_kw
=
partition_parameter_kw
,
...
@@ -133,18 +134,14 @@ class Recipe(object):
...
@@ -133,18 +134,14 @@ class Recipe(object):
self
.
_raise_request_exception_formatted
=
traceback
.
format_exc
()
self
.
_raise_request_exception_formatted
=
traceback
.
format_exc
()
return_parameter_dict
=
{}
return_parameter_dict
=
{}
# Then try to get all the parameters. In case of problem, put empty string.
for
param
in
return_parameters
:
for
param
in
return_parameters
:
options
[
'connection-%s'
%
param
]
=
''
options
[
'connection-%s'
%
param
]
=
''
if
not
self
.
instance
:
continue
try
:
try
:
value
=
return_parameter_dict
[
param
]
options
[
'connection-%s'
%
param
]
=
return_parameter_dict
[
param
]
except
KeyError
:
except
KeyError
:
value
=
''
except
(
slapmodule
.
NotFoundError
,
slapmodule
.
ServerError
,
slapmodule
.
ResourceNotReady
):
if
self
.
failed
is
None
:
if
self
.
failed
is
None
:
self
.
failed
=
param
self
.
failed
=
param
options
[
'connection-%s'
%
param
]
=
value
def
_filterForStorage
(
self
,
partition_parameter_kw
):
def
_filterForStorage
(
self
,
partition_parameter_kw
):
return
partition_parameter_kw
return
partition_parameter_kw
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment