Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::Interface::_parse_dhcpcd (   self,
  pipe 
) [private]

Determines if obtaining an IP using dhcpcd succeeded.

Keyword arguments:
pipe -- stdout pipe to the dhcpcd process.

Returns:
'success' if succesful', an error code string otherwise.

Definition at line 438 of file wnettools.py.

00438                                  :
        """ Determines if obtaining an IP using dhcpcd succeeded.
        
        Keyword arguments:
        pipe -- stdout pipe to the dhcpcd process.
        
        Returns:
        'success' if succesful', an error code string otherwise.
        
        """
        dhcpcd_complete = False
        dhcpcd_success = True
        
        while not dhcpcd_complete:
            line = pipe.readline()
            if line.startswith("Error"):
                dhcpcd_success = False
                dhcpcd_complete = True
            elif line == '':
                dhcpcd_complete = True
            print line
            
        return self._check_dhcp_result(dhcpcd_success)
        
    def _check_dhcp_result(self, success):


Generated by  Doxygen 1.6.0   Back to index