summaryrefslogtreecommitdiff
path: root/patchtracker/SourceArchive.py
diff options
context:
space:
mode:
authorSean Finney <seanius@debian.org>2011-02-20 23:00:31 +0100
committerSean Finney <seanius@debian.org>2011-02-20 23:00:31 +0100
commit0e6d288bf4c21b043a02c6cc19367bb937397edd (patch)
tree2ade9f16c385837df3f486ce818213a049a008fe /patchtracker/SourceArchive.py
parent6bd03818dae68c8f2ec32159d21a02fa5b4f25fd (diff)
downloadpatch-tracker-0e6d288bf4c21b043a02c6cc19367bb937397edd.tar.gz
First stab at extracting suites into a local conf value
Diffstat (limited to 'patchtracker/SourceArchive.py')
-rwxr-xr-xpatchtracker/SourceArchive.py9
1 files changed, 7 insertions, 2 deletions
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]: