Commit 15dedb62 authored by Yusei Tahara's avatar Yusei Tahara

slapos/slap/slap.py: Fix ComputerPartition.setConnectionDict. Declare...

slapos/slap/slap.py: Fix ComputerPartition.setConnectionDict. Declare connection_parameter_hash explicitly, UnboundLocalError may occur.
parent c49161fb
...@@ -607,6 +607,7 @@ class ComputerPartition(SlapRequester): ...@@ -607,6 +607,7 @@ class ComputerPartition(SlapRequester):
# Should we check existence? # Should we check existence?
slave_parameter_list = self.getInstanceParameter("slave_instance_list") slave_parameter_list = self.getInstanceParameter("slave_instance_list")
slave_connection_dict = {} slave_connection_dict = {}
connection_parameter_hash = None
for slave_parameter_dict in slave_parameter_list: for slave_parameter_dict in slave_parameter_list:
if slave_parameter_dict.get("slave_reference") == slave_reference: if slave_parameter_dict.get("slave_reference") == slave_reference:
connection_parameter_hash = slave_parameter_dict.get("connection-parameter-hash", None) connection_parameter_hash = slave_parameter_dict.get("connection-parameter-hash", None)
......
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