The python network script isn' based on exception but return values

* postservice/31-one-netmng (OneClient.create_network): make sure to
  return True since the returned value is checkd in
  “OneNetwork.create()”.

Ref: #24531
This commit is contained in:
Daniel Dehennin 2018-07-20 15:41:34 +02:00
parent cac835e1ee
commit 6f190b5dcd
1 changed files with 3 additions and 3 deletions

View File

@ -130,9 +130,9 @@ class OneClient():
if not res: if not res:
print("Error attaching {0} vnet to {1} cluster".format(vnet_name, cluster)) print("Error attaching {0} vnet to {1} cluster".format(vnet_name, cluster))
return False return False
else:
os.remove(templatefile) os.remove(templatefile)
return True
else: else:
logger.error(u"Creation of virtual network with template {0} failed".format(templatefile)) logger.error(u"Creation of virtual network with template {0} failed".format(templatefile))
return False return False