summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r--meta/lib/oe/utils.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 30d30629f1..cecddc657f 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -46,7 +46,7 @@ def both_contain(variable1, variable2, checkvalue, d):
46 val2 = d.getVar(variable2, True) 46 val2 = d.getVar(variable2, True)
47 val1 = set(val1.split()) 47 val1 = set(val1.split())
48 val2 = set(val2.split()) 48 val2 = set(val2.split())
49 if isinstance(checkvalue, basestring): 49 if isinstance(checkvalue, str):
50 checkvalue = set(checkvalue.split()) 50 checkvalue = set(checkvalue.split())
51 else: 51 else:
52 checkvalue = set(checkvalue) 52 checkvalue = set(checkvalue)
@@ -85,11 +85,11 @@ def prune_suffix(var, suffixes, d):
85 85
86def str_filter(f, str, d): 86def str_filter(f, str, d):
87 from re import match 87 from re import match
88 return " ".join(filter(lambda x: match(f, x, 0), str.split())) 88 return " ".join([x for x in str.split() if match(f, x, 0)])
89 89
90def str_filter_out(f, str, d): 90def str_filter_out(f, str, d):
91 from re import match 91 from re import match
92 return " ".join(filter(lambda x: not match(f, x, 0), str.split())) 92 return " ".join([x for x in str.split() if not match(f, x, 0)])
93 93
94def param_bool(cfg, field, dflt = None): 94def param_bool(cfg, field, dflt = None):
95 """Lookup <field> in <cfg> map and convert it to a boolean; take 95 """Lookup <field> in <cfg> map and convert it to a boolean; take
@@ -134,7 +134,7 @@ def packages_filter_out_system(d):
134 PN-dbg PN-doc PN-locale-eb-gb removed. 134 PN-dbg PN-doc PN-locale-eb-gb removed.
135 """ 135 """
136 pn = d.getVar('PN', True) 136 pn = d.getVar('PN', True)
137 blacklist = map(lambda suffix: pn + suffix, ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev')) 137 blacklist = [pn + suffix for suffix in ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev')]
138 localepkg = pn + "-locale-" 138 localepkg = pn + "-locale-"
139 pkgs = [] 139 pkgs = []
140 140
@@ -235,7 +235,7 @@ def format_pkg_list(pkg_dict, ret_format=None):
235# so implement a version here 235# so implement a version here
236# 236#
237 237
238from Queue import Queue 238from queue import Queue
239from threading import Thread 239from threading import Thread
240 240
241class ThreadedWorker(Thread): 241class ThreadedWorker(Thread):
@@ -249,7 +249,7 @@ class ThreadedWorker(Thread):
249 self.worker_end = worker_end 249 self.worker_end = worker_end
250 250
251 def run(self): 251 def run(self):
252 from Queue import Empty 252 from queue import Empty
253 253
254 if self.worker_init is not None: 254 if self.worker_init is not None:
255 self.worker_init(self) 255 self.worker_init(self)
@@ -264,8 +264,8 @@ class ThreadedWorker(Thread):
264 264
265 try: 265 try:
266 func(self, *args, **kargs) 266 func(self, *args, **kargs)
267 except Exception, e: 267 except Exception as e:
268 print e 268 print(e)
269 finally: 269 finally:
270 self.tasks.task_done() 270 self.tasks.task_done()
271 271