[CRIU] [PATCH 2/7] pycriu: add python package, v3

Ruslan Kuprieiev kupruser at gmail.com
Tue Dec 2 11:58:46 PST 2014


On 12/02/2014 04:18 PM, Pavel Emelyanov wrote:
>
>> +	def SerializeToStringTXT(self, nice=False):
>> +		s = io.BytesIO('')
>> +
>> +		if nice:
>> +			magic = self.desc.magic_name
>> +			indent = 4
>
> BTW, this indentation seem to be useless. When printing
> nested messages google code indents one anyway.
>
> Thus I think we can stop inventing nice and raw formats
> and just pick any of those. Likely the nice one.
>

"Nice" is not only indentation(which in this case is
useless) but human-readable magic and pb entry name.
And they are, in fact, quite useful and nice-looking=).

>> +		else:
>> +			magic = self.desc.magic
>> +			indent = 0
>



More information about the CRIU mailing list