diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-09 14:05:09 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-11 10:34:30 +0100 |
| commit | 3795f4d6a69dc4ba5208f1d05b89e65bc11d8a10 (patch) | |
| tree | 363978673f3e06a03bc2f4a3cb629dd5011cf40a /bitbake/bin | |
| parent | a9d90f74050e2129171da09ca3427720887f67ee (diff) | |
| download | poky-3795f4d6a69dc4ba5208f1d05b89e65bc11d8a10.tar.gz | |
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>
Diffstat (limited to 'bitbake/bin')
| -rwxr-xr-x | bitbake/bin/bitbake-diffsigs | 6 | ||||
| -rwxr-xr-x | bitbake/bin/bitbake-dumpsig | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs index 196f0b73e8..67c60dbb00 100755 --- a/bitbake/bin/bitbake-diffsigs +++ b/bitbake/bin/bitbake-diffsigs | |||
| @@ -95,7 +95,7 @@ def find_compare_task(bbhandler, pn, taskname): | |||
| 95 | # Recurse into signature comparison | 95 | # Recurse into signature comparison |
| 96 | output = bb.siggen.compare_sigfiles(latestfiles[0], latestfiles[1], recursecb) | 96 | output = bb.siggen.compare_sigfiles(latestfiles[0], latestfiles[1], recursecb) |
| 97 | if output: | 97 | if output: |
| 98 | print '\n'.join(output) | 98 | print('\n'.join(output)) |
| 99 | sys.exit(0) | 99 | sys.exit(0) |
| 100 | 100 | ||
| 101 | 101 | ||
| @@ -130,9 +130,9 @@ else: | |||
| 130 | except IOError as e: | 130 | except IOError as e: |
| 131 | logger.error(str(e)) | 131 | logger.error(str(e)) |
| 132 | sys.exit(1) | 132 | sys.exit(1) |
| 133 | except cPickle.UnpicklingError, EOFError: | 133 | except (pickle.UnpicklingError, EOFError): |
| 134 | logger.error('Invalid signature data - ensure you are specifying sigdata/siginfo files') | 134 | logger.error('Invalid signature data - ensure you are specifying sigdata/siginfo files') |
| 135 | sys.exit(1) | 135 | sys.exit(1) |
| 136 | 136 | ||
| 137 | if output: | 137 | if output: |
| 138 | print '\n'.join(output) | 138 | print('\n'.join(output)) |
diff --git a/bitbake/bin/bitbake-dumpsig b/bitbake/bin/bitbake-dumpsig index 656d93a5ac..ffaed1f457 100755 --- a/bitbake/bin/bitbake-dumpsig +++ b/bitbake/bin/bitbake-dumpsig | |||
| @@ -57,9 +57,9 @@ else: | |||
| 57 | except IOError as e: | 57 | except IOError as e: |
| 58 | logger.error(str(e)) | 58 | logger.error(str(e)) |
| 59 | sys.exit(1) | 59 | sys.exit(1) |
| 60 | except cPickle.UnpicklingError, EOFError: | 60 | except (pickle.UnpicklingError, EOFError): |
| 61 | logger.error('Invalid signature data - ensure you are specifying a sigdata/siginfo file') | 61 | logger.error('Invalid signature data - ensure you are specifying a sigdata/siginfo file') |
| 62 | sys.exit(1) | 62 | sys.exit(1) |
| 63 | 63 | ||
| 64 | if output: | 64 | if output: |
| 65 | print '\n'.join(output) | 65 | print('\n'.join(output)) |
