]> err.no Git - dak/commitdiff
Make the wnpp parse more robust for missing files
authorAlexander Reichle-Schmehl <alexander@schmehl.info>
Wed, 29 Sep 2010 11:04:10 +0000 (11:04 +0000)
committerAlexander Reichle-Schmehl <alexander@schmehl.info>
Wed, 29 Sep 2010 11:04:10 +0000 (11:04 +0000)
daklib/utils.py

index 542ede51c8cab50c9b56fd0b09c7e15f3b5daabc..4744f6a2f214dd7cbf67aee9a5b4cae54c604a7a 100755 (executable)
@@ -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: