summaryrefslogtreecommitdiff
path: root/patchtracker
diff options
context:
space:
mode:
authorSean Finney <seanius@debian.org>2010-03-05 07:55:03 +0100
committerSean Finney <seanius@debian.org>2010-03-05 07:55:03 +0100
commit1d7968088e6bda919b52874496691c931daab694 (patch)
tree9074a6259fe22bbc4696252b040b077007932f44 /patchtracker
parent61fcf7a28926422bf7352895ee793e459aeb73c7 (diff)
downloadpatch-tracker-1d7968088e6bda919b52874496691c931daab694.tar.gz
Allow blank lines and comments in quilt series files
Thanks to Colin Watson for the suggestion.
Diffstat (limited to 'patchtracker')
-rw-r--r--patchtracker/Patch.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/patchtracker/Patch.py b/patchtracker/Patch.py
index d6044cc..6533910 100644
--- a/patchtracker/Patch.py
+++ b/patchtracker/Patch.py
@@ -148,9 +148,18 @@ class Quilt30PatchSeries (GenericPatchSeries):
except KeyError:
series_fh = self.tarfh.extractfile("debian/patches/series")
except KeyError:
- self.names = []
- else:
- self.names = [fn.strip() for fn in series_fh.readlines()]
+ series_fh = None
+
+ if series_fh:
+ for line in filter(None, [fn.strip() for fn in series_fh.readlines()]):
+ stuff = line.split(' ')
+ # skip comments
+ if stuff[0][0] == "#":
+ continue
+ # here's the name
+ name = stuff[0]
+ self.names.append(name)
+
# XXX to lazy eval this might be better
for name in self.names:
self.patches[name] = Patch(self.tarfh.extractfile("debian/patches/"+name))