[packagekit] packagekit.progress.py
zodman
zodman at gmail.com
Wed Feb 18 23:44:48 PST 2009
fix
else:
startpct = self.steps[self.current_step-1]
if self.current_step < len(self.steps)-1:
- endpct = self.steps[self.current_step+1]
+ endpct = self.steps[self.current_step]
else:
endpct = 100
deltapct = endpct -startpct
f = float(self.subpercent)/100.0
incr = int(f*deltapct)
+ #print "delta: %s-%s *subp: %s/100 = inc:%.2f" %(
endpct,startpct, self.subpercent, incr)
self.percent = startpct + incr
+ # print self.percent
Richard Hughes escribió:
> On Wed, 2009-02-18 at 02:52 -0600, zodman wrote:
>> Im play with it but im confuse:
>>
>> from the code
>>
>> if i set progress.set_step( [10, 30, 50, 70] )
>>
>>
>> print start at 0% end 30% doing a progress.step() ( 100 prints )
>> then
>> start at 10% end 50% do a progress.step()
>>
>> start at 30% end 70% step()
>>
>> start at 50% end 100% step ()
>>
>> ??????????????????
>>
>> its that correct this ?¿
>
> I'm not sure I understand, sorry (original code was written by Robin
> IIRC):
>
> This code is used by apt, conary, pisi, smart, yum -- so what exactly
> does your patch change? Does anyone else have any comments?
>
> Richard.
>
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
More information about the PackageKit
mailing list