diff options
author | John Snow <jsnow@redhat.com> | 2020-03-30 20:00:07 -0400 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-05-05 13:17:36 +0200 |
commit | 229fc0742a727c1733dd4d0c405c4c590f8dc627 (patch) | |
tree | 933a0b399f832219e79b5e9dab10bd902cb468c9 /tests/qemu-iotests | |
parent | b404b13bd519301c99e603ac660122158ea5b93b (diff) | |
download | qemu-229fc0742a727c1733dd4d0c405c4c590f8dc627.zip qemu-229fc0742a727c1733dd4d0c405c4c590f8dc627.tar.gz qemu-229fc0742a727c1733dd4d0c405c4c590f8dc627.tar.bz2 |
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 <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200331000014.11581-8-jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index dae1248..374a8f6 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) |