summaryrefslogtreecommitdiffhomepage
path: root/demo_simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'demo_simple.py')
-rwxr-xr-xdemo_simple.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/demo_simple.py b/demo_simple.py
index 18e585f6..d664b994 100755
--- a/demo_simple.py
+++ b/demo_simple.py
@@ -25,7 +25,9 @@ import paramiko
##### utility functions
def load_host_keys():
- filename = os.environ['HOME'] + '/.ssh/known_hosts'
+ # this file won't exist on windows, but windows doesn't have a standard
+ # location for this file anyway.
+ filename = os.path.expanduser('~/.ssh/known_hosts')
keys = {}
try:
f = open(filename, 'r')