From ef22ff2394fa60c8cff739a3caf4014fbcf7531c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 16 Sep 2006 11:26:07 +0200 Subject: * bugfixes for the non-interactive mode --- UpdateManager/Common/DistInfo.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'UpdateManager/Common/DistInfo.py') 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': -- cgit v1.2.3