[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] tell the uninitiated that 2 is ENOENT



Signed-off-by: Helmut Grohne <helmut@subdivi.de>
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
---
 daklib/utils.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index c75b6be..f2a7904 100644
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -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
-- 
1.7.10.4



Reply to: