X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=f2a790414e1b5028534f06acd851c4823bedc907;hb=cef9cea84f51cacb08d6096abe770527eba6865d;hp=c75b6be6a5edb8f24b7d52f2eaa274df445fc704;hpb=29d33b3185e2c26c5b305aa996137c73ed64333e;p=dak.git 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