________________________________
From: Andrey Shinkevich <[email protected]>
Sent: Monday, June 8, 2020 8:48 AM
To: Vladimir Sementsov-Ogievskiy <[email protected]>; 
[email protected] <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] 
<[email protected]>; [email protected] <[email protected]>; [email protected] 
<[email protected]>; Denis Lunev <[email protected]>
Subject: Re: [PATCH v5 12/13] qcow2: QcowHeaderExtension print names for 
extension magics



________________________________
From: Vladimir Sementsov-Ogievskiy <[email protected]>
Sent: Saturday, June 6, 2020 11:18 AM
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] 
<[email protected]>; [email protected] <[email protected]>; [email protected] 
<[email protected]>; Denis Lunev <[email protected]>; Andrey Shinkevich 
<[email protected]>; Vladimir Sementsov-Ogievskiy 
<[email protected]>
Subject: [PATCH v5 12/13] qcow2: QcowHeaderExtension print names for extension 
magics

Suggested-by: Andrey Shinkevich <[email protected]>
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
 tests/qemu-iotests/031.out         | 22 +++++++++++-----------
 tests/qemu-iotests/036.out         |  4 ++--
 tests/qemu-iotests/061.out         | 14 +++++++-------
 tests/qemu-iotests/qcow2_format.py | 17 ++++++++++++++++-
 4 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/tests/qemu-iotests/qcow2_format.py 
b/tests/qemu-iotests/qcow2_format.py
index 32371e42da..40b5bf467b 100644
--- a/tests/qemu-iotests/qcow2_format.py
+++ b/tests/qemu-iotests/qcow2_format.py
@@ -39,6 +39,12 @@ class Flags64(Qcow2Field):
         return str(bits)


+class Enum(Qcow2Field):
+
+    def __str__(self):
+        return f'{self.value:#x} ({self.mapping.get(self.value, "<unknown>")})'

I've got the error E0100: invalid syntax [pylama]

Andrey

The script itself works. Probably, my python syntax checker is obsolete.

Andrey

Reply via email to