Permalink
Browse files

Prompt for key_filename if configuration is incorrect

Make key_filename more friendly to developer-specific system paths, 
especially when using common refills from the config repo.
  • Loading branch information...
cybertoast committed Apr 5, 2012
1 parent a5446db commit c34dcb9bdbd906d074ccc07e0dceff600d367a72
Showing with 3 additions and 0 deletions.
  1. +3 −0 fabfile.py
View
@@ -89,6 +89,9 @@
# SSH Key configuration
env.key_filename = os.path.expanduser(env.key_filename)
+while not os.path.exists(env.key_filename):
+ env.key_filename = prompt("Keffile %s not found. Provide valid SSH keyfile (eg. ~/.ssh/ChangeByUs.pem: " % env.key_filename)
+ env.key_filename = os.path.expanduser(env.key_filename)
env.ssh_port = 48022
# We need to make the hosts into a list

0 comments on commit c34dcb9

Please sign in to comment.