[master 2/18] Convert pylorax to python3

bcl installerbot-noreply at redhat.com
Fri May 15 16:21:07 UTC 2015


In reply to line 46 of src/pylorax/sysutils.py:

Python closes files automatically when they go out of scope so this opens it for writing, creating if it doesn't exist, and then immediately closes it. I could add an explicit .write("") to it if that makes it clearer. The previous form using with didn't look clean to me, there's no need to use the context manager form to do this.

-- 
To view this comment on github, visit https://github.com/bcl/lorax/commit/5e2596fd8a07df5ab19a1d36535d3f474cc2fd78#commitcomment-11217372


More information about the anaconda-patches mailing list