Commit 6771273c authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Sebastien Robin

Simplify code a bit.

parent 85bc04d7
...@@ -45,9 +45,7 @@ class Recipe(object): ...@@ -45,9 +45,7 @@ class Recipe(object):
options['computer-id'], options['partition-id']) options['computer-id'], options['partition-id'])
self.request = computer_partition.request self.request = computer_partition.request
self.isSlave = False self.isSlave = options.get('slave', '').lower() in ['y', 'yes', 'true', '1']
if 'slave' in options:
self.isSlave = options['slave'].lower() in ['y', 'yes', 'true', '1']
self.return_parameters = [] self.return_parameters = []
if 'return' in options: if 'return' in options:
...@@ -57,9 +55,7 @@ class Recipe(object): ...@@ -57,9 +55,7 @@ class Recipe(object):
self.logger.debug("No parameter to return to main instance." self.logger.debug("No parameter to return to main instance."
"Be careful about that...") "Be careful about that...")
software_type = 'RootInstanceSoftware' software_type = options.get('software-type', 'RootInstanceSoftware')
if 'software-type' in options:
software_type = options['software-type']
filter_kw = {} filter_kw = {}
if 'sla' in options: if 'sla' in options:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment