Commit a9ae94dd authored by Łukasz Nowak's avatar Łukasz Nowak

slapos/request: Force !py! magic workaround

In order to force zc.buildout to remove, if needed, !py! magic string,
always access software-type key by using __getitem__ (with []), instead
of get, and reimplement default in caller.
parent 875857e4
......@@ -105,7 +105,11 @@ class Recipe(object):
if not return_parameters:
self.logger.debug("No parameter to return to main instance."
"Be careful about that...")
software_type = options.get('software-type', DEFAULT_SOFTWARE_TYPE)
# due the fact that zc.buildout __getitem__ removes magic !py! and get
# method do not, use __getitem__ always
software_type = options['software-type'] \
if 'software-type' in options else DEFAULT_SOFTWARE_TYPE
if 'config' in options or 'sla' in options:
raise UserError("'config' & 'sla' options are obsolete."
" Clean up your software release.")
......
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