From b3fc65289d33274cd5dace4d4ffe55be11c991f4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 7 Dec 2018 15:33:34 +0000 Subject: fetch2: Fix os.errno references os.errno used to happen to work but is invalid. Correct to use errno. [YOCTO #13068] Signed-off-by: Richard Purdie --- lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 03e56471d..bb8346246 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1028,7 +1028,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): raise except IOError as e: - if e.errno in [os.errno.ESTALE]: + if e.errno in [errno.ESTALE]: logger.warning("Stale Error Observed %s." % ud.url) return False raise @@ -1717,7 +1717,7 @@ class Fetch(object): update_stamp(ud, self.d) except IOError as e: - if e.errno in [os.errno.ESTALE]: + if e.errno in [errno.ESTALE]: logger.error("Stale Error Observed %s." % u) raise ChecksumError("Stale Error Detected") -- cgit 1.2.3-korg