Logo Search packages:      
Sourcecode: wicd version File versions

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

Determines if obtaining an IP using pump succeeded.

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

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

Definition at line 414 of file wnettools.py.

00414                                :
        """ Determines if obtaining an IP using pump succeeded.

        Keyword arguments:
        pipe -- stdout pipe to the dhcpcd process.
        
        Returns:
        'success' if succesful, an error code string otherwise.
        
        """
        pump_complete = False
        pump_success = True
        
        while not pump_complete:
            line = pipe.readline()
            if line == '':
                pump_complete = True
            elif line.strip().lower().startswith('Operation failed.'):
                pump_success = False
                pump_complete = True
            print line
            
        return self._check_dhcp_result(pump_success)

    def _parse_dhcpcd(self, pipe):


Generated by  Doxygen 1.6.0   Back to index