1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

bitbake: bin, toaster: Fix print and exception syntax

This updates the print "" syntax to print() and fixes some exception
handling syntax such that its compatible with python v2 and v3.

(Bitbake rev: 58304fcce9727fd89564436771356c033ecd22a3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2016-05-09 14:05:09 +01:00
parent a9d90f7405
commit 3795f4d6a6
12 changed files with 119 additions and 119 deletions
+3 -3
View File
@@ -95,7 +95,7 @@ def find_compare_task(bbhandler, pn, taskname):
# Recurse into signature comparison
output = bb.siggen.compare_sigfiles(latestfiles[0], latestfiles[1], recursecb)
if output:
print '\n'.join(output)
print('\n'.join(output))
sys.exit(0)
@@ -130,9 +130,9 @@ else:
except IOError as e:
logger.error(str(e))
sys.exit(1)
except cPickle.UnpicklingError, EOFError:
except (pickle.UnpicklingError, EOFError):
logger.error('Invalid signature data - ensure you are specifying sigdata/siginfo files')
sys.exit(1)
if output:
print '\n'.join(output)
print('\n'.join(output))
+2 -2
View File
@@ -57,9 +57,9 @@ else:
except IOError as e:
logger.error(str(e))
sys.exit(1)
except cPickle.UnpicklingError, EOFError:
except (pickle.UnpicklingError, EOFError):
logger.error('Invalid signature data - ensure you are specifying a sigdata/siginfo file')
sys.exit(1)
if output:
print '\n'.join(output)
print('\n'.join(output))