]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
tell the uninitiated that 2 is ENOENT
[dak.git] / daklib / utils.py
index c75b6be6a5edb8f24b7d52f2eaa274df445fc704..f2a790414e1b5028534f06acd851c4823bedc907 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