[PATCH] D68802: [LNT] Python 3 support: fix writing report to tmp file

Przemyslaw Wirkus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 04:31:09 PST 2019


PrzemekWirkus added inline comments.


================
Comment at: lnt/util/ImportData.py:341-343
+    fp = os.fdopen(fd, "w")
+    fp.write(data)
+    fp.close()
----------------
PrzemekWirkus wrote:
> This can be simplified to:
> 
> with os.fdopen(fd, "w") as fp:
>     fp.write(data)
> 
> ?
Got that code block wrong last time:
```
with os.fdopen(fd, "w") as fp:
    fp.write(data)
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68802/new/

https://reviews.llvm.org/D68802





More information about the llvm-commits mailing list