summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/shell.py')
-rw-r--r--bitbake/lib/bb/shell.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/shell.py b/bitbake/lib/bb/shell.py
index aeead679b2..f9ca9d5bd3 100644
--- a/bitbake/lib/bb/shell.py
+++ b/bitbake/lib/bb/shell.py
@@ -53,6 +53,7 @@ PROBLEMS:
53########################################################################## 53##########################################################################
54 54
55from __future__ import print_function 55from __future__ import print_function
56from functools import reduce
56try: 57try:
57 set 58 set
58except NameError: 59except NameError:
@@ -178,12 +179,12 @@ class BitBakeShellCommands:
178 print("ERROR: No Provider") 179 print("ERROR: No Provider")
179 last_exception = Providers.NoProvider 180 last_exception = Providers.NoProvider
180 181
181 except runqueue.TaskFailure, fnids: 182 except runqueue.TaskFailure as fnids:
182 for fnid in fnids: 183 for fnid in fnids:
183 print("ERROR: '%s' failed" % td.fn_index[fnid]) 184 print("ERROR: '%s' failed" % td.fn_index[fnid])
184 last_exception = runqueue.TaskFailure 185 last_exception = runqueue.TaskFailure
185 186
186 except build.EventException, e: 187 except build.EventException as e:
187 print("ERROR: Couldn't build '%s'" % names) 188 print("ERROR: Couldn't build '%s'" % names)
188 last_exception = e 189 last_exception = e
189 190
@@ -246,7 +247,7 @@ class BitBakeShellCommands:
246 cooker.buildFile(bf, cmd) 247 cooker.buildFile(bf, cmd)
247 except parse.ParseError: 248 except parse.ParseError:
248 print("ERROR: Unable to open or parse '%s'" % bf) 249 print("ERROR: Unable to open or parse '%s'" % bf)
249 except build.EventException, e: 250 except build.EventException as e:
250 print("ERROR: Couldn't build '%s'" % name) 251 print("ERROR: Couldn't build '%s'" % name)
251 last_exception = e 252 last_exception = e
252 253
@@ -644,7 +645,7 @@ def columnize( alist, width = 80 ):
644 return reduce(lambda line, word, width=width: '%s%s%s' % 645 return reduce(lambda line, word, width=width: '%s%s%s' %
645 (line, 646 (line,
646 ' \n'[(len(line[line.rfind('\n')+1:]) 647 ' \n'[(len(line[line.rfind('\n')+1:])
647 + len(word.split('\n',1)[0] 648 + len(word.split('\n', 1)[0]
648 ) >= width)], 649 ) >= width)],
649 word), 650 word),
650 alist 651 alist