fixing CLI host rewriting when host's default interface does not have an IP

This commit is contained in:
Brian O'Connor
2013-12-05 17:30:09 -08:00
parent 5da9376222
commit c7e86f9374
+2 -1
View File
@@ -331,7 +331,8 @@ class CLI( Cmd ):
node = self.mn[ first ]
rest = args.split( ' ' )
# Substitute IP addresses for node names in command
rest = [ self.mn[ arg ].defaultIntf().updateIP()
# If updateIP() returns None, then use node name
rest = [ self.mn[ arg ].defaultIntf().updateIP() or arg
if arg in self.mn else arg
for arg in rest ]
rest = ' '.join( rest )