From e85af5f8a57084d8bc355623f879e13502aa366e Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Tue, 2 Sep 2008 19:30:36 +0200 Subject: new ReleaseList class to order project releases --- patchtracker/SourceArchive.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'patchtracker/SourceArchive.py') diff --git a/patchtracker/SourceArchive.py b/patchtracker/SourceArchive.py index 832b315..099b506 100755 --- a/patchtracker/SourceArchive.py +++ b/patchtracker/SourceArchive.py @@ -144,6 +144,18 @@ class SourcePackageIndex: def indices(self): return sorted(self.pkgs.iterkeys()) +class ReleaseList: + + def __init__(self, project): + self.project = project + # XXX this is hard coded for now... + self.relorder = {} + self.relorder["debian"] = ["etch", "lenny", "sid", "experimental"] + + def __iter__(self): + for r in self.relorder[self.project]: + yield r + # basic module tests if __name__ == "__main__": import Conf -- cgit v1.2.3