Commit 9cf8379c authored by Vincent Pelletier's avatar Vincent Pelletier

Reorder condition for simpler code.

Also, fix stupid error in error handling path.
parent 92c0c673
......@@ -120,11 +120,8 @@ def parseMasterList(masters, except_node=None):
socket_connector_temp = getConnectorFromAddress(address)
if socket_connector is None:
socket_connector = socket_connector_temp
elif socket_connector == socket_connector_temp:
pass
else:
return TypeError, (" Wrong connector type : you're trying to use ipv6 and ipv4 simultaneously")
elif socket_connector != socket_connector_temp:
raise TypeError("Wrong connector type : you're trying to use ipv6 and ipv4 simultaneously")
return master_node_list, socket_connector
class Enum(dict):
......
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