diff options
| author | Sebastian Heinlein <sebi@sebi-pc> | 2006-09-26 10:47:19 +0200 |
|---|---|---|
| committer | Sebastian Heinlein <sebi@sebi-pc> | 2006-09-26 10:47:19 +0200 |
| commit | dd3fbec4f2bb0ecbf237b058f85175c5d0befce9 (patch) | |
| tree | e00d94e7c77b45f8ac9792a9c80a68e2a2391d7c /UpdateManager/Common/DistInfo.py | |
| parent | 4de7b5c16a98fcc5e6d9ff4d32ca289c44a5192b (diff) | |
| parent | 90a9b9f0faf09a401693f7cfcbd362ff62559929 (diff) | |
| download | python-apt-dd3fbec4f2bb0ecbf237b058f85175c5d0befce9.tar.gz | |
* merge with mvo
Diffstat (limited to 'UpdateManager/Common/DistInfo.py')
| -rw-r--r-- | UpdateManager/Common/DistInfo.py | 13 |
1 files changed, 8 insertions, 5 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': |
