Browse Source

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 <richard.purdie@linuxfoundation.org>
Richard Purdie 5 years ago
parent
commit
03aae96a88
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/bb/fetch2/__init__.py

+ 2 - 2
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")