diff options
author | Doug Hellmann <doug@doughellmann.com> | 2018-06-13 15:33:40 -0400 |
---|---|---|
committer | Doug Hellmann <doug@doughellmann.com> | 2018-06-13 15:34:11 -0400 |
commit | bce298fb608032b08dad4d6c1f51d946c1777040 (patch) | |
tree | efc9fed1451a210df4c2df456a1f7d2ffae7674e | |
parent | 434d7da456a00fea81fa570872613228c3bf7c3f (diff) | |
download | python-barbicanclient-bce298fb608032b08dad4d6c1f51d946c1777040.tar.gz |
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>
-rw-r--r-- | barbicanclient/barbican_cli/v1/orders.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/barbicanclient/barbican_cli/v1/orders.py b/barbicanclient/barbican_cli/v1/orders.py index 713f907..385d265 100644 --- a/barbicanclient/barbican_cli/v1/orders.py +++ b/barbicanclient/barbican_cli/v1/orders.py @@ -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) |