summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/urls.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-10 16:27:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:15 +0100
commit3249e33251102069c88e2bc3f703cfab51444668 (patch)
tree77b5ea5d17a2cfaaf612c7f058fedf25574a9b30 /bitbake/lib/toaster/toastermain/urls.py
parentbfc21fd9b23ff62c1dc422b606b289f2457f29e5 (diff)
downloadpoky-3249e33251102069c88e2bc3f703cfab51444668.tar.gz
bitbake: toaster: use 'in' instead of has_key
Dictionary method has_key is deprecated in python 2 and absent in python 3. Used '<key> in <dict>' statement to make the code working on both python 2 and python 3. [YOCTO #9584] (Bitbake rev: 3d7ad7ba0d1a6f688ae885817c049f2a8ced11b5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastermain/urls.py')
-rw-r--r--bitbake/lib/toaster/toastermain/urls.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastermain/urls.py b/bitbake/lib/toaster/toastermain/urls.py
index 530a42ffab..1f8599edc3 100644
--- a/bitbake/lib/toaster/toastermain/urls.py
+++ b/bitbake/lib/toaster/toastermain/urls.py
@@ -71,7 +71,7 @@ import os
71currentdir = os.path.dirname(__file__) 71currentdir = os.path.dirname(__file__)
72for t in os.walk(os.path.dirname(currentdir)): 72for t in os.walk(os.path.dirname(currentdir)):
73 #if we have a virtualenv skip it to avoid incorrect imports 73 #if we have a virtualenv skip it to avoid incorrect imports
74 if os.environ.has_key('VIRTUAL_ENV') and os.environ['VIRTUAL_ENV'] in t[0]: 74 if 'VIRTUAL_ENV' in os.environ and os.environ['VIRTUAL_ENV'] in t[0]:
75 continue 75 continue
76 76
77 if "urls.py" in t[2] and t[0] != currentdir: 77 if "urls.py" in t[2] and t[0] != currentdir: