[oe-commits] Robert Yang : cachedpath.py: global name 'error' is not defined
git at git.openembedded.org
git at git.openembedded.org
Wed May 15 16:22:21 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: ac0e2781c2723257bd380cac170d4c8b97e36747
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ac0e2781c2723257bd380cac170d4c8b97e36747
Author: Robert Yang <liezhi.yang at windriver.com>
Date: Mon May 13 16:34:28 2013 +0800
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 at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/cachedpath.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py
index c7860ef..0840cc4 100644
--- a/meta/lib/oe/cachedpath.py
+++ b/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
More information about the Openembedded-commits
mailing list