diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-28 09:29:31 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-08-28 09:29:31 +0200 |
| commit | 288544afdf646aeebaa1dc7790612a1af098352b (patch) | |
| tree | 688ce53f51c39e34c496763b4392b92dbaa393fa /UpdateManager | |
| parent | 558f70b24693a1692be2ab79c4047af762f9e010 (diff) | |
| parent | 37827c0f97d0711820443325d3d1c65b755cdfb4 (diff) | |
| download | python-apt-288544afdf646aeebaa1dc7790612a1af098352b.tar.gz | |
* merged with mvo devel branch
Diffstat (limited to 'UpdateManager')
| -rw-r--r-- | UpdateManager/Common/aptsources.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index fd77fe63..80781cb0 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -209,10 +209,11 @@ class NullMatcher(object): return True class SourcesList: - def __init__(self, withMatcher=True): + def __init__(self, withMatcher=True, + matcherPath="/usr/share/update-manager/channels/"): self.list = [] # of Type SourceEntries if withMatcher: - self.matcher = SourceEntryMatcher() + self.matcher = SourceEntryMatcher(matcherPath) else: self.matcher = NullMatcher() self.refresh() @@ -378,6 +379,7 @@ class SourceCompTemplate: self.on_by_default = on_by_default class SourceEntryTemplates: + def __init__(self,datadir): _ = gettext.gettext self.templates = [] @@ -411,10 +413,10 @@ class SourceEntryMatcher: self.comps = l_comps self.comps_descriptions = l_comps_descr - def __init__(self): + def __init__(self, matcherPath): self.templates = [] # Get the human readable channel and comp names from the channel .infos - spec_files = glob.glob("/usr/share/update-manager/channels/*.info") + spec_files = glob.glob("%s/*.info" % matcherPath) for f in spec_files: f = os.path.basename(f) i = f.find(".info") @@ -440,9 +442,7 @@ class SourceEntryMatcher: class Distribution: def __init__(self): - """" - Container for distribution specific informations - """ + """ Container for distribution specific informations """ # LSB information self.id = "" self.codename = "" |
