summaryrefslogtreecommitdiffhomepage
path: root/demo.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2005-08-17 15:54:29 +0000
committerRobey Pointer <robey@lag.net>2005-08-17 15:54:29 +0000
commit01ca23cacefd242dba5b5662aa4f46595196588e (patch)
tree9e610c582a9be54fa8a5f3b8b5f38cee48cfe7b5 /demo.py
parent0f3bf86617999de2aff056b8455aa33c64188e3a (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-xdemo.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/demo.py b/demo.py
index d0dda7f4..2f0242b5 100755
--- a/demo.py
+++ b/demo.py
@@ -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):