[Yum-devel] [PATCH 5/9] Turn 'local_size' to reference.

Zdeněk Pavlas zpavlas at redhat.com
Mon Jun 27 16:01:11 UTC 2011


---
 yum/__init__.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/yum/__init__.py b/yum/__init__.py
index cbb9055..2fc0323 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1979,7 +1979,7 @@ class YumBase(depsolve.Depsolve):
             urlgrabber.progress.text_meter_total_size(remote_size)
         beg_download = time.time()
         i = 0
-        local_size = 0
+        local_size = [0]
         done_repos = set()
         for po in remote_pkgs:
             local = po.localPkg()
@@ -2006,10 +2006,10 @@ class YumBase(depsolve.Depsolve):
                                    text=text,
                                    cache=po.repo.http_caching != 'none',
                                    )
-                local_size += po.size
+                local_size[0] += po.size
                 if hasattr(urlgrabber.progress, 'text_meter_total_size'):
                     urlgrabber.progress.text_meter_total_size(remote_size,
-                                                              local_size)
+                                                              local_size[0])
                 if po.repoid not in done_repos:
                     #  Check a single package per. repo. ... to give a hint to
                     # the user on big downloads.
-- 
1.7.4.4



More information about the Yum-devel mailing list