Browse Source

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Robert Yang 11 years ago
parent
commit
ac0e2781c2
1 changed files with 1 additions and 3 deletions
  1. 1 3
      meta/lib/oe/cachedpath.py

+ 1 - 3
meta/lib/oe/cachedpath.py

@@ -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