Skip to content

Commit 5cf4048

Browse files
author
Gabriel Monroy
committed
Merge pull request #154 from opdemand/153-no-ssh-keys
Fixed #153 -- warn and return if no SSH keys found.
2 parents f0bb9fc + e40d0aa commit 5cf4048

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

client/deis.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,9 @@ def keys_add(self, args):
968968
if not path:
969969
ssh_dir = os.path.expanduser('~/.ssh')
970970
pubkeys = glob.glob(os.path.join(ssh_dir, '*.pub'))
971+
if not pubkeys:
972+
print('No SSH public keys found')
973+
return
971974
print('Found the following SSH public keys:')
972975
for i, k in enumerate(pubkeys):
973976
key = k.split(os.path.sep)[-1]

0 commit comments

Comments
 (0)