diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-06-20 12:08:07 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:37 +0100 |
commit | ef1de9ecaf73e28234d284b79ec45e084d0f0c53 (patch) | |
tree | 417f87922c1a2fa4a3bbd4b35e0772221f96641e /bitbake/lib/bb/shell.py | |
parent | 20dc452614c991d1a4f5b7dcc1307cd03cba0c55 (diff) | |
download | openembedded-core-contrib-ef1de9ecaf73e28234d284b79ec45e084d0f0c53.tar.gz |
Apply some 2to3 refactorings
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
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 |