From: Richard Purdie Date: Fri, 7 Dec 2018 15:33:34 +0000 (+0000) Subject: bitbake: fetch2: Fix os.errno references X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e74f80433e9a7e7ae7ec1472eb7387301d2dc816;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: fetch2: Fix os.errno references os.errno used to happen to work but is invalid. Correct to use errno. [YOCTO #13068] (Bitbake rev: 03aae96a8859409b1ce7e3d5c1197371fa96bd14) Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 709372e16f1..f112067df50 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -1027,7 +1027,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 @@ -1716,7 +1716,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")