Add missing check for no interface to GetIP.
This commit is contained in:
1 parent
34832775c8
commit
b8db5007fa
1 file changed
+1
@@ -577,6 +577,7 @@ class BaseInterface(object):
|
||||
The IP address of the interface in dotted quad form.
|
||||
|
||||
"""
|
||||
if not self.iface: return ""
|
||||
if not ifconfig:
|
||||
cmd = 'ifconfig ' + self.iface
|
||||
if self.verbose: print cmd
|
||||
|
||||
Reference in new issue
Block a user