[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v9 07/14] iotests: drop pre-Python 3.4 compatibility code
From: |
John Snow |
Subject: |
[PATCH v9 07/14] iotests: drop pre-Python 3.4 compatibility code |
Date: |
Tue, 24 Mar 2020 19:20:56 -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>
---
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 2a0e22a3db..c93c6b4557 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 v9 02/14] iotests: don't use 'format' for drive_add, (continued)
- [PATCH v9 02/14] iotests: don't use 'format' for drive_add, John Snow, 2020/03/24
- [PATCH v9 03/14] iotests: ignore import warnings from pylint, John Snow, 2020/03/24
- [PATCH v9 04/14] iotests: replace mutable list default args, John Snow, 2020/03/24
- [PATCH v9 05/14] iotests: add pylintrc file, John Snow, 2020/03/24
- [PATCH v9 06/14] iotests: alphabetize standard imports, John Snow, 2020/03/24
- [PATCH v9 07/14] iotests: drop pre-Python 3.4 compatibility code,
John Snow <=
- [PATCH v9 08/14] iotests: touch up log function signature, John Snow, 2020/03/24
- [PATCH v9 10/14] iotests: add hmp helper with logging, John Snow, 2020/03/24
- [PATCH v9 12/14] iotest 258: use script_main, John Snow, 2020/03/24