[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.50-3-g6b69331

Andreas Beckmann anbe at debian.org
Sat Mar 16 16:19:53 UTC 2013


The following commit has been merged in the develop branch:
commit 6b69331fb72b094c6150995afdaf428b9bd6f3b2
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri Mar 15 23:25:07 2013 +0100

    lib/db: do not fail to hand out the last package
    
    deleting someting from a list while iterating over it is a bad idea,
    so return a copy of the list instead
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 874b8de..b6f83ec 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -676,7 +676,7 @@ class PackagesDB:
                         for p in self._candidates_for_testing]
                 self._candidates_for_testing = [x[2]
                         for x in sorted(tuples, reverse = True)]
-        return self._candidates_for_testing
+        return self._candidates_for_testing[:]
 
     def _remove_unavailable_candidate(self, p):
         self._candidates_for_testing.remove(p)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list