From: John Snow Date: Tue, 31 Mar 2020 00:00:07 +0000 (-0400) Subject: iotests: drop pre-Python 3.4 compatibility code X-Git-Tag: v5.1.0-rc0~141^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=229fc0742a727c1733dd4d0c405c4c590f8dc627;p=thirdparty%2Fqemu.git iotests: drop pre-Python 3.4 compatibility code We no longer need to accommodate <3.4, drop this code. (The lines were > 79 chars and it stood out.) Signed-off-by: John Snow Reviewed-by: Max Reitz Message-Id: <20200331000014.11581-8-jsnow@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index dae124872eb..374a8f60771 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -360,12 +360,9 @@ def log(msg, filters=(), indent=None): for flt in filters: msg = flt(msg) if isinstance(msg, (dict, list)): - # Python < 3.4 needs to know not to add whitespace when pretty-printing: - separators = (', ', ': ') if indent is None else (',', ': ') # Don't sort if it's already sorted do_sort = not isinstance(msg, OrderedDict) - print(json.dumps(msg, sort_keys=do_sort, - indent=indent, separators=separators)) + print(json.dumps(msg, sort_keys=do_sort, indent=indent)) else: print(msg)