[packagekit] packagekit.progress.py

zodman zodman at gmail.com
Wed Feb 18 08:51:58 PST 2009


[zodman at cosmogirl PackageKit]$ git diff lib/python/packagekit/progress.py
diff --git a/lib/python/packagekit/progress.py 
b/lib/python/packagekit/progress.
index d0f33f4..df18c46 100644
--- a/lib/python/packagekit/progress.py
+++ b/lib/python/packagekit/progress.py
@@ -89,7 +89,7 @@ class PackagekitProgress:
          if self.current_step == 0:
              startpct = 0
          else:
-            startpct = self.steps[self.current_step-1]
+            startpct = self.steps[self.current_step]
          if self.current_step < len(self.steps)-1:
              endpct = self.steps[self.current_step+1]
          else:



start at 0% end 10% do a progress.step()

  start at 10% end 30% step()

  start at 30% end 50% step ()
start at 50% end 70% step()
start at 70% end 100% step()

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