[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-598-gace668e

Andreas Beckmann debian at abeckmann.de
Sun May 27 13:47:29 UTC 2012


The following commit has been merged in the piatti branch:
commit eba4350ae676c71e3c65e622cf51e00b5832bf4e
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sat Mar 10 11:34:29 2012 +0100

    cleanup computation of waiting-to-be-tested state
    
    do not abuse strings as booleans
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 2dd9d38..05cdbb7 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -369,15 +369,15 @@ class PackagesDB:
             if dep_state in self._dep_state_to_state:
                 return self._dep_state_to_state[dep_state]
 
-        state = "waiting-to-be-tested"
+        testable = True
         for dep in package.dependencies():
             dep_state = self.get_package_state(dep)
             if dep_state not in \
                     ["successfully-tested", "essential-required"]:
-                state = "unknown"
+                testable = False
                 break
-        if state == "waiting-to-be-tested":
-            return state
+        if testable:
+            return "waiting-to-be-tested"
 
         # treat circular-dependencies as testable (for the part of the circle)
         state = "unknown" 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list