When validating builds, return True if the build validates, and don't
[invirt/packages/invirt-dev.git] / python / invirt / builder.py
index a89acf2..c1730df 100644 (file)
@@ -88,6 +88,8 @@ def validateBuild(pocket, package, commit):
     package_repo = getRepo(package)
     new_version = getVersion(package, commit)
 
+    ret = True
+
     for p in config.build.pockets:
         if p == pocket:
             continue
@@ -99,7 +101,7 @@ def validateBuild(pocket, package, commit):
 
         if current_version == new_version:
             if current_commit == commit:
-                return p
+                ret = p
             else:
                 raise InvalidBuild('Version %s of %s already available in '
                                    'pocket %s from commit %s' %
@@ -120,4 +122,4 @@ def validateBuild(pocket, package, commit):
                                'commit currently in pocket %s' %
                                (commit, package, pocket))
 
-
+    return ret