summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-18 20:55:57 +0000
committerGerrit Code Review <review@openstack.org>2016-03-18 20:55:57 +0000
commitf9f6abe56414a56ea28863ad5824a5c176a75b33 (patch)
treeca148b682da3a2c8d80c570976947fc332151c33 /openstackclient
parentad3af0ef6971a8f481b752e948ae5d3a3a5956a6 (diff)
parent21e414d860347b080ba98fc023029caa16d686f4 (diff)
downloadpython-openstackclient-f9f6abe56414a56ea28863ad5824a5c176a75b33.tar.gz
Merge "Fix keypair create --public-key"
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/compute/v2/keypair.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/openstackclient/compute/v2/keypair.py b/openstackclient/compute/v2/keypair.py
index 22d918a4..1db0f942 100644
--- a/openstackclient/compute/v2/keypair.py
+++ b/openstackclient/compute/v2/keypair.py
@@ -48,8 +48,7 @@ class CreateKeypair(command.ShowOne):
public_key = parsed_args.public_key
if public_key:
try:
- with io.open(os.path.expanduser(parsed_args.public_key),
- "rb") as p:
+ with io.open(os.path.expanduser(parsed_args.public_key)) as p:
public_key = p.read()
except IOError as e:
msg = "Key file %s not found: %s"