Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos
Commits
ba3e7075
Commit
ba3e7075
authored
Nov 03, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve request recipe in order to fail properly
parent
ee719ddf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
slapos/recipe/request.py
slapos/recipe/request.py
+6
-1
No files found.
slapos/recipe/request.py
View file @
ba3e7075
...
@@ -75,13 +75,18 @@ class Recipe(object):
...
@@ -75,13 +75,18 @@ class Recipe(object):
options
[
'name'
],
partition_parameter_kw
=
partition_parameter_kw
,
options
[
'name'
],
partition_parameter_kw
=
partition_parameter_kw
,
filter_kw
=
filter_kw
)
filter_kw
=
filter_kw
)
self
.
failed
=
None
for
param
in
self
.
return_parameters
:
for
param
in
self
.
return_parameters
:
try
:
try
:
options
[
'connection-%s'
%
param
]
=
instance
.
getConnectionParameter
(
param
)
options
[
'connection-%s'
%
param
]
=
str
(
instance
.
getConnectionParameter
(
param
)
)
except
slapmodule
.
NotFoundError
:
except
slapmodule
.
NotFoundError
:
options
[
'connection-%s'
%
param
]
=
''
options
[
'connection-%s'
%
param
]
=
''
if
self
.
failed
is
None
:
self
.
failed
=
param
def
install
(
self
):
def
install
(
self
):
if
self
.
failed
is
not
None
:
raise
KeyError
(
"Connection parameter %r not found."
%
self
.
failed
)
return
[]
return
[]
update
=
install
update
=
install
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