]> granicus.if.org Git - handbrake/commit
configure: Modernize Python in configure.py.
authorcclauss <cclauss@bluewin.ch>
Sun, 8 Jan 2017 10:23:45 +0000 (11:23 +0100)
committerBradley Sepos <bradley@bradleysepos.com>
Sat, 4 Mar 2017 14:38:32 +0000 (09:38 -0500)
commitdf8a5e76a3f834f9676e8b475bcf1d6216d7efc2
treef6bad9210747957f3abc5034e9946912afdfd452
parentb34b6735a0cf072f0b1683266ab9a067686b159a
configure: Modernize Python in configure.py.

file is a Python built-in (https://docs.python.org/2/library/functions.html?highlight=file#file) so it should be avoided as a variable name.
Use "with open" syntax to automate file close where possible.
os.getenv() will return None if the key is not in os.environ.
Use ternary if to simplify conditional assignment where it improves, not hinders, readability.

Closes #500.
make/configure.py