Skip to content

Commit

Permalink
Closes-Bug: #1641411 Handle the smlite case of passing empty string f…
Browse files Browse the repository at this point in the history
…or gateway value

Change-Id: Ifee5dcded8dbbf00bff20a0530e66514e73afda4
  • Loading branch information
sgurumurthy committed Nov 15, 2016
1 parent 8bf8bb1 commit a0346f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/server_mgr_main.py
Expand Up @@ -3740,8 +3740,11 @@ def get_control_ip(self, server):
def get_control_gateway(self, server):
control_intf = eval(self.get_control_interface(server))
for key, value in control_intf.iteritems():
if 'gateway' in value and value['gateway'] != 'None':
return str(IPNetwork(value['gateway']).ip)
if 'gateway' in value:
if value['gateway'].isspace() or not value['gateway'] or value['gateway'] == 'None':
return ''
else:
return str(IPNetwork(value['gateway']).ip)
if 'gateway' in server and len(server['gateway']):
return str(IPNetwork(server['gateway']).ip)
else:
Expand Down

0 comments on commit a0346f0

Please sign in to comment.