use open() instead of file()

Under python 3 the built-in file() has been removed. Use open()
instead, since it works for both python 2 and 3.

Change-Id: Ifec91646f036dabd8dd6dcd4c648ef4b5bf23427
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-13 15:33:40 -04:00
parent 434d7da456
commit bce298fb60
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class CreateOrder(show.ShowOne):
request_data = None
if args.request_file:
try:
request_data = file(args.request_file).read()
request_data = open(args.request_file, 'r').read()
except IOError:
raise ValueError(
'Couldn\'t read request file %s.' % args.request_file)