diff options
Diffstat (limited to 'patchtracker')
-rw-r--r-- | patchtracker/Patch.py | 15 |
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)) |