fix pep8 errors under python 3

Under python 3 'print' is a function, and the linter does not like
having a space between the function name and the paren indicating the
call. Remove the space.

The builtin 'file' is removed under python 3. Replace its use with
'open', which is available on both python 2 and 3.

Change-Id: Ib8522d8ab1974a4ba3e407ffbe449e2f5fc9471a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 17:23:04 -04:00
parent f40833754c
commit 2ee0583763
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ def run_job(conf, storage):
pp.field_names = response[0]
for i in response[1]:
pp.add_row(i)
print (pp)
print(pp)
else:
return

View File

@ -153,7 +153,7 @@ class RestoreOs(object):
msg = "Failed to open image file {}".format(image_file)
LOG.error(msg)
raise BaseException(msg)
info = json.load(file(metadata_file))
info = json.load(open(metadata_file, 'r'))
image = self.client_manager.create_image(
name="restore_{}".format(path),
container_format="bare",