diff options
Diffstat (limited to 'bitbake/lib/bb/shell.py')
-rw-r--r-- | bitbake/lib/bb/shell.py | 9 |
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: ########################################################################## from __future__ import print_function +from functools import reduce try: set except NameError: @@ -178,12 +179,12 @@ class BitBakeShellCommands: print("ERROR: No Provider") last_exception = Providers.NoProvider - except runqueue.TaskFailure, fnids: + except runqueue.TaskFailure as fnids: for fnid in fnids: print("ERROR: '%s' failed" % td.fn_index[fnid]) last_exception = runqueue.TaskFailure - except build.EventException, e: + except build.EventException as e: print("ERROR: Couldn't build '%s'" % names) last_exception = e @@ -246,7 +247,7 @@ class BitBakeShellCommands: cooker.buildFile(bf, cmd) except parse.ParseError: print("ERROR: Unable to open or parse '%s'" % bf) - except build.EventException, e: + except build.EventException as e: print("ERROR: Couldn't build '%s'" % name) last_exception = e @@ -644,7 +645,7 @@ def columnize( alist, width = 80 ): return reduce(lambda line, word, width=width: '%s%s%s' % (line, ' \n'[(len(line[line.rfind('\n')+1:]) - + len(word.split('\n',1)[0] + + len(word.split('\n', 1)[0] ) >= width)], word), alist |