From cef9cea84f51cacb08d6096abe770527eba6865d Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 15 May 2014 20:32:30 +0200 Subject: [PATCH] tell the uninitiated that 2 is ENOENT Signed-off-by: Helmut Grohne Signed-off-by: Helmut Grohne --- daklib/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daklib/utils.py b/daklib/utils.py index c75b6be6..f2a79041 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 -- 2.39.2