Remove redundant processing for '/'
This commit is contained in:
+1
-4
@@ -518,10 +518,7 @@ class Node( object ):
|
|||||||
intf: intf or intf name
|
intf: intf or intf name
|
||||||
ip: IP address as a string
|
ip: IP address as a string
|
||||||
prefixLen: prefix length, e.g. 8 for /8 or 16M addrs"""
|
prefixLen: prefix length, e.g. 8 for /8 or 16M addrs"""
|
||||||
# This should probably be rethought
|
return self.intf( intf ).setIP( ip, prefixLen )
|
||||||
if '/' not in ip:
|
|
||||||
ip = '%s/%s' % ( ip, prefixLen )
|
|
||||||
return self.intf( intf ).setIP( ip )
|
|
||||||
|
|
||||||
def IP( self, intf=None ):
|
def IP( self, intf=None ):
|
||||||
"Return IP address of a node or specific interface."
|
"Return IP address of a node or specific interface."
|
||||||
|
|||||||
Reference in New Issue
Block a user