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:
parent
9db342950e
commit
91d851c448
5 changed files with 11 additions and 11 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue