Apply modernize transform libmodernize.fixes.fix_file.

This replaces use of file() with open() which is python 3 compatible,
and also adds it to our python 3 support test suite.
This commit is contained in:
Tim Abbott 2015-10-14 16:31:08 -04:00
parent 9db342950e
commit 91d851c448
5 changed files with 11 additions and 11 deletions

View file

@ -164,7 +164,7 @@ class Client(object):
config_file = get_default_config_filename()
if os.path.exists(config_file):
config = SafeConfigParser()
with file(config_file, 'r') as f:
with open(config_file, 'r') as f:
config.readfp(f, config_file)
if api_key is None:
api_key = config.get("api", "key")