Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def guidance-power-manager::PowerManager::_checkOldConfig (   self,
  value,
  blank 
) [private]

Convert old numerical values to keywords. 

Definition at line 153 of file guidance-power-manager.py.

00153                                            :
        """ Convert old numerical values to keywords. """
        try:
            num_val = int(value)
        except ValueError:
            return value
        if blank:
            if num_val == 0: return 'nothing'
            if num_val == 1: return 'blank'
            if num_val == 2: return 'suspend'
            if num_val == 3: return 'hibernate'
            if num_val == 4: return 'shutdown'
        else:
            if num_val == 0: return 'nothing'
            if num_val == 1: return 'suspend'
            if num_val == 2: return 'hibernate'
            if num_val == 3: return 'shutdown'
        return value

    def _initConfigKeywords(self):


Generated by  Doxygen 1.6.0   Back to index