Skip to contentSkip to conversation

cachedpath.py: global name 'error' is not defined

PATCH New Robert Yang 1 participant 2 messages May 13, 2013

lore
Share & tools
lore
#0 lore raw

cover cachedpath.py: global name 'error' is not defined

The following changes since commit f7afeeb75993b159bb8959e0309bc5eb3978a8fb:

bitbake: bitbake-layers/tinfoil: Catch up with status -> recpiecache rename (2013-05-12 18:00:46 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib robert/cachedpath
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/cachedpath

Robert Yang (1):
cachedpath.py: global name 'error' is not defined

 meta/lib/oe/cachedpath.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 cachedpath.py: global name 'error' is not defined

The error is not global since we don't use "from os import *", so it should be os.error.

[YOCTO #4489]

---
 meta/lib/oe/cachedpath.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta/lib/oe/cachedpath.py +1 -3
index c7860ef..0840cc4 100644
@@ -122,10 +122,8 @@ class CachedPath(object):
         # minor reason when (say) a thousand readable directories are still
         # left to visit.  That logic is copied here.
         try:
-            # Note that listdir and error are globals in this module due
-            # to earlier import-*.
             names = os.listdir(top)
-        except error as err:
+        except os.error as err:
             if onerror is not None:
                 onerror(err)
             return
Signature · 1 line
1.8.1.2