[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 07/14] iotests: drop pre-Python 3.4 compatibility code
From: |
John Snow |
Subject: |
[PATCH v10 07/14] iotests: drop pre-Python 3.4 compatibility code |
Date: |
Mon, 30 Mar 2020 20:00:07 -0400 |
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 <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/iotests.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index e6f9f62b2b..010bca526c 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -359,12 +359,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)
--
2.21.1
- [PATCH v10 00/14] iotests: use python logging, John Snow, 2020/03/30
- [PATCH v10 02/14] iotests: don't use 'format' for drive_add, John Snow, 2020/03/30
- [PATCH v10 01/14] iotests: do a light delinting, John Snow, 2020/03/30
- [PATCH v10 03/14] iotests: ignore import warnings from pylint, John Snow, 2020/03/30
- [PATCH v10 04/14] iotests: replace mutable list default args, John Snow, 2020/03/30
- [PATCH v10 07/14] iotests: drop pre-Python 3.4 compatibility code,
John Snow <=
- [PATCH v10 05/14] iotests: add pylintrc file, John Snow, 2020/03/30
- [PATCH v10 08/14] iotests: touch up log function signature, John Snow, 2020/03/30
- [PATCH v10 10/14] iotests: add hmp helper with logging, John Snow, 2020/03/30
- [PATCH v10 06/14] iotests: alphabetize standard imports, John Snow, 2020/03/30
- [PATCH v10 09/14] iotests: limit line length to 79 chars, John Snow, 2020/03/30