[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic |
Date: |
Thu, 24 Sep 2020 12:01:51 -0400 |
On Tue, Sep 22, 2020 at 05:00:51PM -0400, John Snow wrote:
> Make the file handling here just a tiny bit more idiomatic.
> (I realize this is heavily subjective.)
>
> Use exist_ok=True for os.makedirs and remove the exception,
> use fdopen() to wrap the file descriptor in a File-like object,
> and use a context manager for managing the file pointer.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, (continued)
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Eduardo Habkost, 2020/09/23
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, John Snow, 2020/09/23
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Cleber Rosa, 2020/09/24
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Markus Armbruster, 2020/09/25
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Daniel P . Berrangé, 2020/09/25
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Eric Blake, 2020/09/25
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Markus Armbruster, 2020/09/25
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Eric Blake, 2020/09/25
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, Eduardo Habkost, 2020/09/25
- Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic, John Snow, 2020/09/25
Re: [PATCH v2 28/38] qapi/gen.py: update write() to be more idiomatic,
Cleber Rosa <=
[PATCH v2 29/38] qapi/gen.py: delint with pylint, John Snow, 2020/09/22
[PATCH v2 10/38] qapi/common.py: delint with pylint, John Snow, 2020/09/22
[PATCH v2 27/38] qapi/gen.py: Remove unused parameter, John Snow, 2020/09/22