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

2020-08-06 Thread Vladimir Sementsov-Ogievskiy
06.08.2020 12:08, Andrey Shinkevich wrote: On 05.08.2020 19:58, Vladimir Sementsov-Ogievskiy wrote: 30.07.2020 17:15, 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 v12 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-06 Thread Andrey Shinkevich
On 05.08.2020 19:58, Vladimir Sementsov-Ogievskiy wrote: 30.07.2020 17:15, 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 v12 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
30.07.2020 17:15, 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 v12 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-07-30 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