Re: [PATCH v11 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
29.07.2020 08:56, Andrey Shinkevich wrote: On 28.07.2020 14:09, Vladimir Sementsov-Ogievskiy wrote: 17.07.2020 11:14, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fie

Re: [PATCH v11 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-07-28 Thread Andrey Shinkevich
On 28.07.2020 14:09, Vladimir Sementsov-Ogievskiy wrote: 17.07.2020 11:14, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fields and their values. Extend it in subclass

Re: [PATCH v11 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-07-28 Thread Vladimir Sementsov-Ogievskiy
17.07.2020 11:14, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fields and their values. Extend it in subclass when necessary to print the final dictionary in the JSON o

[PATCH v11 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-07-17 Thread Andrey Shinkevich
As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fields and their values. Extend it in subclass when necessary to print the final dictionary in the JSON output which follows. Suggested-by: Vladimir