]> git.donarmstrong.com Git - dak.git/blobdiff - daklib/utils.py
visually fix daklib.utils.parse_wnpp_bug_file
[dak.git] / daklib / utils.py
index c75b6be6a5edb8f24b7d52f2eaa274df445fc704..3175e9875046f3a405bec1e9d4718be70377c4e0 100644 (file)
@@ -42,6 +42,7 @@ import re
 import email as modemail
 import subprocess
 import ldap
+import errno
 
 import daklib.config as config
 import daklib.daksubprocess
@@ -358,7 +359,7 @@ def check_size(where, files):
         try:
             entry = os.stat(f)
         except OSError as exc:
-            if exc.errno == 2:
+            if exc.errno == errno.ENOENT:
                 # TODO: This happens when the file is in the pool.
                 continue
             raise
@@ -1566,7 +1567,7 @@ def parse_wnpp_bug_file(file = "/srv/ftp-master.debian.org/scripts/masterfiles/w
         lines = f.readlines()
     except IOError as e:
         print "Warning:  Couldn't open %s; don't know about WNPP bugs, so won't close any." % file
-       lines = []
+        lines = []
     wnpp = {}
 
     for line in lines: