Fix IP printing exception

This commit is contained in:
Brandon Heller
2009-12-19 19:20:53 -08:00
parent b426d24e45
commit 2e52801de5
+4 -2
View File
@@ -265,8 +265,10 @@ class Node( object ):
return 'UP' in self.cmd( 'ifconfig ' + self.intfs[ 0 ] )
# Other methods
def __str__( self ):
result = self.name
result += ": IP=" + self.IP() + " intfs=" + ','.join( self.intfs )
result = self.name + ":"
if self.IP():
result += " IP=" + self.IP()
result += " intfs=" + ','.join( self.intfs )
result += " waiting=" + `self.waiting`
return result