diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-01-25 17:22:20 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-01-25 17:22:20 +0000 |
commit | ad7a21e81231ae64540310384fb0f87ac8758b02 (patch) | |
tree | 0f59e73b0f707482f8bf5c12e6ef071c62c5053b | |
parent | 2dc2f10de3e20854f8b7cbada9622d699a41f106 (diff) | |
parent | 651514df88fd53d537b3b78a7548663cc0816b1b (diff) | |
download | qemu-ad7a21e81231ae64540310384fb0f87ac8758b02.zip qemu-ad7a21e81231ae64540310384fb0f87ac8758b02.tar.gz qemu-ad7a21e81231ae64540310384fb0f87ac8758b02.tar.bz2 |
Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging
Python 3 compatibility fixes
# gpg: Signature made Fri 25 Jan 2019 14:04:56 GMT
# gpg: using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/python-next-pull-request:
decodetree: re.fullmatch was added in 3.4
device-crash-test: Python 3 compatibility fix
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | scripts/decodetree.py | 2 | ||||
-rwxr-xr-x | scripts/device-crash-test | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 0bc73b5..e342d27 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -204,7 +204,7 @@ def output(*args): output_fd.write(a) -if sys.version_info >= (3, 0): +if sys.version_info >= (3, 4): re_fullmatch = re.fullmatch else: def re_fullmatch(pat, str): diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 483dafb..2a13fa4 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -557,7 +557,8 @@ def main(): logger.info("Skipped %d test cases", skipped) if args.debug: - stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in enumerate(ERROR_WHITELIST)]) + stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in + enumerate(ERROR_WHITELIST)], key=lambda x: x[0]) for count, wl in stats: dbg("whitelist entry stats: %d: %r", count, wl) |