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:
parent
434d7da456
commit
bce298fb60
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue