From 0e6d288bf4c21b043a02c6cc19367bb937397edd Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Sun, 20 Feb 2011 23:00:31 +0100 Subject: First stab at extracting suites into a local conf value --- patchtracker/SourceArchive.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'patchtracker/SourceArchive.py') diff --git a/patchtracker/SourceArchive.py b/patchtracker/SourceArchive.py index 9f30c58..b99e3a4 100755 --- a/patchtracker/SourceArchive.py +++ b/patchtracker/SourceArchive.py @@ -4,6 +4,7 @@ from fnmatch import fnmatch from gzip import GzipFile from debian_bundle import deb822 import difflib +from patchtracker import Conf class Archive: def __init__(self, dir, suitefilter=None, pkgfilter=None): @@ -28,6 +29,8 @@ class Archive: def parsesuites(self, filter=None): slist = os.listdir(self.distsdir) + if Conf.suites: + slist = set(Conf.suites).intersection(set(slist)) if filter: slist = set(filter).intersection(set(slist)) for s in sorted(slist): @@ -172,9 +175,11 @@ class ReleaseList: def __init__(self, project): self.project = project - # XXX this is hard coded for now... self.relorder = {} - self.relorder["debian"] = ["lenny", "squeeze", "wheezy", "sid", "experimental"] + if Conf.suites: + self.relorder["debian"] = Conf.suites + else: + self.relorder["debian"] = ["lenny", "squeeze", "wheezy", "sid", "experimental"] def __iter__(self): for r in self.relorder[self.project]: -- cgit v1.2.3