Commit 9fdf00dc authored by Łukasz Nowak's avatar Łukasz Nowak

Slave instances are disabled, so protect against UnboundLocalError.

parent 8bc02232
...@@ -873,13 +873,15 @@ class SlapTool(BaseTool): ...@@ -873,13 +873,15 @@ class SlapTool(BaseTool):
if shared: if shared:
# XXX: Dirty hack # XXX: Dirty hack
slave_instance = None
for slave_instance in parameter_dict.get("slave_instance_list", []): for slave_instance in parameter_dict.get("slave_instance_list", []):
if slave_instance['slave_title'] == partition_reference: if slave_instance['slave_title'] == partition_reference:
break break
software_instance._parameter_dict = self._instanceXmlToDict( if slave_instance is not None:
slave_instance.pop('xml')) software_instance._parameter_dict = self._instanceXmlToDict(
software_instance._connection_dict = self._instanceXmlToDict( slave_instance.pop('xml'))
slave_instance.pop('connection_xml')) software_instance._connection_dict = self._instanceXmlToDict(
slave_instance.pop('connection_xml'))
return xml_marshaller.xml_marshaller.dumps(software_instance) return xml_marshaller.xml_marshaller.dumps(software_instance)
#################################################### ####################################################
......
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