diff options
| author | glatzor@ubuntu.com <> | 2006-09-02 11:47:55 +0200 |
|---|---|---|
| committer | glatzor@ubuntu.com <> | 2006-09-02 11:47:55 +0200 |
| commit | 650cb474d23914be801af09d5f9c31cfc9765b07 (patch) | |
| tree | 688ce53f51c39e34c496763b4392b92dbaa393fa /UpdateManager | |
| parent | 953ca5a7624c9398a9fa3c86b203d0c029444d87 (diff) | |
| parent | 288544afdf646aeebaa1dc7790612a1af098352b (diff) | |
| download | python-apt-650cb474d23914be801af09d5f9c31cfc9765b07.tar.gz | |
* merge with mvo
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 = "" |
