mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 05:04:46 +00:00
Fix OS X ifconfig call.
This commit is contained in:
parent
040e6b49e0
commit
b249150d9a
1 changed files with 3 additions and 3 deletions
|
|
@ -154,7 +154,7 @@ class IfConfig (object):
|
|||
@type ifname: string
|
||||
"""
|
||||
if sys.platform == 'darwin':
|
||||
return ifconfig_inet().get('address')
|
||||
return ifconfig_inet(ifname).get('address')
|
||||
return self._getaddr(ifname, self.SIOCGIFADDR)
|
||||
|
||||
def getMask (self, ifname):
|
||||
|
|
@ -163,7 +163,7 @@ class IfConfig (object):
|
|||
@type ifname: string
|
||||
"""
|
||||
if sys.platform == 'darwin':
|
||||
return ifconfig_inet().get('netmask')
|
||||
return ifconfig_inet(ifname).get('netmask')
|
||||
return self._getaddr(ifname, self.SIOCGIFNETMASK)
|
||||
|
||||
def getBroadcast (self, ifname):
|
||||
|
|
@ -172,7 +172,7 @@ class IfConfig (object):
|
|||
@type ifname: string
|
||||
"""
|
||||
if sys.platform == 'darwin':
|
||||
return ifconfig_inet().get('broadcast')
|
||||
return ifconfig_inet(ifname).get('broadcast')
|
||||
return self._getaddr(ifname, self.SIOCGIFBRDADDR)
|
||||
|
||||
def isUp (self, ifname):
|
||||
|
|
|
|||
Loading…
Reference in a new issue