Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::Interface::IsUp (   self  )  [inherited]

Determines if the interface is up.

Returns:
True if the interface is up, False otherwise.

Definition at line 545 of file wnettools.py.

00545                   :
        """ Determines if the interface is up.
        
        Returns:
        True if the interface is up, False otherwise.
        
        """
        if not self.iface: return False
        cmd = "ifconfig " + self.iface
        output = misc.Run(cmd)
        lines = output.split('\n')
        if len(lines) < 5:
            return False
        
        for line in lines[1:4]:
            if line.strip().startswith('UP'):
                return True
            
        return False


class WiredInterface(Interface):


Generated by  Doxygen 1.6.0   Back to index