From: Alexander Reichle-Schmehl Date: Wed, 29 Sep 2010 11:04:10 +0000 (+0000) Subject: Make the wnpp parse more robust for missing files X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d965c34b35048f8a8fab0a7a11f2943d833952d;p=dak Make the wnpp parse more robust for missing files --- diff --git a/daklib/utils.py b/daklib/utils.py index 542ede51..4744f6a2 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -1548,7 +1548,14 @@ def parse_wnpp_bug_file(file = "/srv/ftp-master.debian.org/scripts/masterfiles/w returns a dict associating source package name with a list of open wnpp bugs (Yes, there might be more than one) """ - lines = open(file).readlines() + + line = [] + try: + f = open(file) + lines = f.readlines() + except IOerror, e: + print "Warning: Couldn't open %s; don't know about WNPP bugs, so won't close any." % file + lines = [] wnpp = {} for line in lines: