]> git.donarmstrong.com Git - dak.git/commitdiff
tell the uninitiated that 2 is ENOENT
authorHelmut Grohne <helmut@subdivi.de>
Thu, 15 May 2014 18:32:30 +0000 (20:32 +0200)
committerJoerg Jaspert <joerg@debian.org>
Thu, 15 May 2014 19:43:28 +0000 (21:43 +0200)
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
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