diff options
Diffstat (limited to 'openstackclient/image/v2')
| -rw-r--r-- | openstackclient/image/v2/image.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index b068ddaf..029f57a3 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -440,8 +440,14 @@ class CreateImage(command.ShowOne): prompt=("Please enter private key password, leave " "empty if none: "), confirm=False) + if not pw or len(pw) < 1: pw = None + else: + # load_private_key() requires the password to be + # passed as bytes + pw = pw.encode() + signer.load_private_key( sign_key_path, password=pw) |
