Merge "Replace file() with open() for Python 3 compatibility"
This commit is contained in:
commit
5e6c2740ec
|
@ -132,7 +132,7 @@ def set_host_enabled(self, arg_dict):
|
||||||
|
|
||||||
|
|
||||||
def _write_config_dict(dct):
|
def _write_config_dict(dct):
|
||||||
conf_file = file(config_file_path, "w")
|
conf_file = open(config_file_path, 'w')
|
||||||
json.dump(dct, conf_file)
|
json.dump(dct, conf_file)
|
||||||
conf_file.close()
|
conf_file.close()
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ def _get_config_dict():
|
||||||
is returned.
|
is returned.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
conf_file = file(config_file_path)
|
conf_file = open(config_file_path, 'r')
|
||||||
config_dct = json.load(conf_file)
|
config_dct = json.load(conf_file)
|
||||||
conf_file.close()
|
conf_file.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|
Loading…
Reference in New Issue