From 941584f539846c0ea26c96f425d8eefe33db8a3b Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Mon, 13 May 2013 16:34:28 +0800 Subject: 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] (From OE-Core rev: ac0e2781c2723257bd380cac170d4c8b97e36747) Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- meta/lib/oe/cachedpath.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'meta/lib/oe/cachedpath.py') diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py index c7860ef4fb..0840cc4c3f 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 -- cgit v1.2.3-54-g00ecf