diff options
author | Robey Pointer <robey@lag.net> | 2005-08-17 15:54:29 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2005-08-17 15:54:29 +0000 |
commit | 01ca23cacefd242dba5b5662aa4f46595196588e (patch) | |
tree | 9e610c582a9be54fa8a5f3b8b5f38cee48cfe7b5 /demo.py | |
parent | 0f3bf86617999de2aff056b8455aa33c64188e3a (diff) |
[project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-55]
fix the loading of known_hosts in the demos to work on winodws/cygwin
Diffstat (limited to 'demo.py')
-rwxr-xr-x | demo.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -114,8 +114,11 @@ try: try: keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) except IOError: - print '*** Unable to open host keys file' - keys = {} + try: + keys = paramiko.util.load_host_keys(os.path.expanduser('~/ssh/known_hosts')) + except IOError: + print '*** Unable to open host keys file' + keys = {} key = t.get_remote_server_key() if not keys.has_key(hostname): |