ctl: use open() instead of file() (#36515)
This commit is contained in:
parent
87e940ddfc
commit
b401245d4b
|
@ -104,7 +104,7 @@ class CmdCheckHobos(Command):
|
|||
# get environment definition from stdin
|
||||
self.all_services = json.load(sys.stdin)
|
||||
else:
|
||||
self.all_services = json.load(file(args[1]))
|
||||
self.all_services = json.load(open(args[1]))
|
||||
|
||||
try:
|
||||
service = [x for x in self.all_services.get('services', []) if \
|
||||
|
@ -128,7 +128,7 @@ class CmdCheckHobos(Command):
|
|||
skeleton_filepath = os.path.join(global_app_dir, 'skeletons',
|
||||
service.get('template_name'))
|
||||
if os.path.exists(skeleton_filepath):
|
||||
pub.import_zip(file(skeleton_filepath))
|
||||
pub.import_zip(open(skeleton_filepath, 'rb'))
|
||||
new_site = True
|
||||
else:
|
||||
print('updating instance in', pub.app_dir)
|
||||
|
|
Loading…
Reference in New Issue