Don't require that a pocket exists when validating
authorGreg Brockman <gdb@mit.edu>
Tue, 6 Jul 2010 04:28:20 +0000 (00:28 -0400)
committerGreg Brockman <gdb@mit.edu>
Tue, 6 Jul 2010 04:28:20 +0000 (00:28 -0400)
svn path=/trunk/packages/invirt-dev/; revision=3042

python/invirt/builder.py

index c800cf8..b4a7abf 100644 (file)
@@ -6,9 +6,9 @@ and the remctl submission scripts that insert items into its queue.
 
 
 import os
 
 
 import os
+import subprocess
 
 from debian_bundle import changelog
 
 from debian_bundle import changelog
-from debian_bundle import deb822
 
 import invirt.common as c
 from invirt.config import structs as config
 
 import invirt.common as c
 from invirt.config import structs as config
@@ -124,8 +124,13 @@ def validateBuild(pocket, package, commit):
             continue
 
         b = pocketToGit(p)
             continue
 
         b = pocketToGit(p)
-        current_commit = c.captureOutput(['git', 'rev-parse', b],
-                                         cwd=package_repo).strip()
+        try:
+            current_commit = c.captureOutput(['git', 'rev-parse', b],
+                                             cwd=package_repo).strip()
+        except subprocess.CalledProcessError:
+            # Guess we haven't created this pocket yet
+            continue
+
         current_version = getVersion(package, b)
 
         if current_version == new_version:
         current_version = getVersion(package, b)
 
         if current_version == new_version: