summaryrefslogtreecommitdiff
path: root/UpdateManager/Common/DistInfo.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-16 11:26:07 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-16 11:26:07 +0200
commitef22ff2394fa60c8cff739a3caf4014fbcf7531c (patch)
treec7dbab3271d01b4a53f52d21aa41482fb637835f /UpdateManager/Common/DistInfo.py
parent77bd6849a9bcd0855b47244558f1df7bc64da197 (diff)
downloadpython-apt-ef22ff2394fa60c8cff739a3caf4014fbcf7531c.tar.gz
* bugfixes for the non-interactive mode
Diffstat (limited to 'UpdateManager/Common/DistInfo.py')
-rw-r--r--UpdateManager/Common/DistInfo.py13
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':