]> code.ossystems Code Review - openembedded-core.git/commitdiff
cachedpath.py: global name 'error' is not defined
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 13 May 2013 08:34:28 +0000 (16:34 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 May 2013 05:32:14 +0000 (08:32 +0300)
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>
meta/lib/oe/cachedpath.py

index c7860ef4fb11dd109602b3c8b34a824f17fadba9..0840cc4c3fc84dc10227a49df298da8f120391ea 100644 (file)
@@ -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