diff options
Diffstat (limited to 'UpdateManager/Common')
| -rw-r--r-- | UpdateManager/Common/DistInfo.py | 13 | ||||
| -rw-r--r-- | UpdateManager/Common/aptsources.py | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/UpdateManager/Common/DistInfo.py b/UpdateManager/Common/DistInfo.py index 83603ed9..8153f04b 100644 --- a/UpdateManager/Common/DistInfo.py +++ b/UpdateManager/Common/DistInfo.py @@ -116,11 +116,14 @@ class DistInfo: elif field == 'MatchURI': suite.match_uri = value elif field == 'MirrorsFile': - suite.valid_mirrors = filter(lambda s: - ((s != "") and - (not s.startswith("#"))), - map(string.strip, - open(value))) + if os.path.exists(value): + suite.valid_mirrors = filter(lambda s: + ((s != "") and + (not s.startswith("#"))), + map(string.strip, + open(value))) + else: + print "WARNING: can't read '%s'" % value elif field == 'Description': suite.description = _(value) elif field == 'Component': diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index 81b65cfa..836b8fae 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -396,7 +396,7 @@ class SourceEntryMatcher: f = os.path.basename(f) i = f.find(".info") f = f[0:i] - dist = DistInfo(f) + dist = DistInfo(f,base_dir=matcherPath) for suite in dist.suites: if suite.match_uri != None: self.templates.append(suite) |
