From: Helmut Grohne Date: Thu, 15 May 2014 18:32:30 +0000 (+0200) Subject: tell the uninitiated that 2 is ENOENT X-Git-Url: https://git.donarmstrong.com/?p=dak.git;a=commitdiff_plain;h=cef9cea84f51cacb08d6096abe770527eba6865d tell the uninitiated that 2 is ENOENT Signed-off-by: Helmut Grohne Signed-off-by: Helmut Grohne --- 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