summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/keypair.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/compute/v2/keypair.py')
-rw-r--r--openstackclient/compute/v2/keypair.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/openstackclient/compute/v2/keypair.py b/openstackclient/compute/v2/keypair.py
index 972443a4..6aedbfee 100644
--- a/openstackclient/compute/v2/keypair.py
+++ b/openstackclient/compute/v2/keypair.py
@@ -57,8 +57,9 @@ class CreateKeypair(show.ShowOne):
with open(os.path.expanduser(parsed_args.public_key)) as p:
public_key = p.read()
except IOError as e:
- raise exceptions.CommandError(
- "Key file %s not found: %s" % (parsed_args.public_key, e))
+ msg = "Key file %s not found: %s"
+ raise exceptions.CommandError(msg
+ % (parsed_args.public_key, e))
keypair = compute_client.keypairs.create(
parsed_args.name,