gbp-pq: don't fail on missing series file
authorGuido Günther <agx@sigxcpu.org>
Tue, 27 Sep 2011 21:40:22 +0000 (23:40 +0200)
committerGuido Günther <agx@sigxcpu.org>
Tue, 27 Sep 2011 21:40:22 +0000 (23:40 +0200)
but create an empty branch instead

gbp/pq.py

index b8d62a1..9ffe77a 100644 (file)
--- a/gbp/pq.py
+++ b/gbp/pq.py
@@ -55,6 +55,10 @@ class PatchQueue(list):
     def read_series_file(klass, seriesfile):
         """Read a series file into L{Patch} objects"""
         patch_dir = os.path.dirname(seriesfile)
+
+        if not os.path.exists(seriesfile):
+            return []
+
         try:
             s = file(seriesfile)
         except Exception, err: