mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
Apply some 2to3 refactorings
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
20dc452614
commit
ef1de9ecaf
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user