From bce298fb608032b08dad4d6c1f51d946c1777040 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 13 Jun 2018 15:33:40 -0400 Subject: 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 --- barbicanclient/barbican_cli/v1/orders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1