On 2/15/21 4:04 PM, John Snow wrote:
> On 2/11/21 5:01 PM, Cleber Rosa wrote:
>> Closing a file that is open for writing, and then reading from it
>> sounds like a better idea than the opposite, given that the content
>> will be flushed.
>>
>> Reference: https://docs.python.org/3/library/io.html#io.IOBase.close
>> Signed-off-by: Cleber Rosa <[email protected]>
>> ---
>> python/qemu/machine.py | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/python/qemu/machine.py b/python/qemu/machine.py
>> index 7a40f4604b..6e44bda337 100644
>> --- a/python/qemu/machine.py
>> +++ b/python/qemu/machine.py
>> @@ -337,12 +337,12 @@ class QEMUMachine:
>
> Is there a way to improve context for python functions? What method is
> this in? etc.
'man gitattributes' suggests that having this line in .gitattributes
would help:
*.py diff=python
/me goes to play with it...
Does this look better to you? It certainly does to me! I'll go ahead
and propose the .gitattributes change as a formal patch...
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
-@@ -337,12 +337,12 @@ class QEMUMachine:
+@@ -337,12 +337,12 @@ def _post_shutdown(self) -> None:
self._qmp.close()
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org