Commit a6588150 authored by Michal Čihař's avatar Michal Čihař

Create dir before trying to generate ssh key

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent ad64bef9
......@@ -207,6 +207,13 @@ def can_generate_key():
"""
Checks whether we can generate key.
"""
ssh_dir = data_dir('ssh')
if not os.path.exists(ssh_dir):
try:
os.makedirs(ssh_dir)
except OSError:
return False
try:
ret = subprocess.check_call(
['which', 'ssh-keygen'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment