From 55109f91117a5e75ddc1be9544d0daf2febaf2c8 Mon Sep 17 00:00:00 2001 From: calvin Date: Sun, 3 Jul 2005 23:08:26 +0000 Subject: [PATCH] fix log level git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2687 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/dns/ifconfig.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/linkcheck/dns/ifconfig.py b/linkcheck/dns/ifconfig.py index af720bd3..dcbf529c 100644 --- a/linkcheck/dns/ifconfig.py +++ b/linkcheck/dns/ifconfig.py @@ -70,13 +70,14 @@ class IfConfig (object): return iflist def getFlags (self, ifname): - """ Get the flags for an interface + """ + Get the flags for an interface """ ifreq = struct.pack("32s", ifname) try: result = self._fcntl(self.SIOCGIFFLAGS, ifreq) except IOError, msg: - linkcheck.log.warn(linkcheck.LOG_NET, + linkcheck.log.warn(linkcheck.LOG_CHECK, "error getting flags for interface %r: %s", ifname, msg) return 0 # extract the interface's flags from the return value @@ -85,17 +86,25 @@ class IfConfig (object): return flags def getAddr (self, ifname): - """Get the inet addr for an interface""" + """ + Get the inet addr for an interface. + """ return self._getaddr(ifname, self.SIOCGIFADDR) def getMask (self, ifname): - """Get the netmask for an interface""" + """ + Get the netmask for an interface. + """ return self._getaddr(ifname, self.SIOCGIFNETMASK) def getBroadcast (self, ifname): - """Get the broadcast addr for an interface""" + """ + Get the broadcast addr for an interface. + """ return self._getaddr(ifname, self.SIOCGIFBRDADDR) def isUp (self, ifname): - """Check whether interface 'ifname' is UP""" + """ + Check whether interface 'ifname' is UP. + """ return (self.getFlags(ifname) & self.IFF_UP) != 0