Logo Search packages:      
Sourcecode: packagekit version File versions  Download package

def packagekit::backend::PackagekitProgress::_update_percent (   self  )  [private]

Increment percentage based on current step and subpercentage

Definition at line 467 of file backend.py.

00467                              :
        '''
        Increment percentage based on current step and subpercentage
        '''
        if self.current_step == 0:
            startpct = 0
        else:
            startpct = self.steps[self.current_step-1]
        if self.current_step < len(self.steps)-1:
            endpct = self.steps[self.current_step+1]
        else:
            endpct = 100
        deltapct = endpct -startpct
        f = float(self.subpercent)/100.0
        incr = int(f*deltapct)
        self.percent = startpct + incr

def exceptionHandler(typ, value, tb, base):


Generated by  Doxygen 1.6.0   Back to index