summaryrefslogtreecommitdiffhomepage
path: root/demos/demo.py
diff options
context:
space:
mode:
Diffstat (limited to 'demos/demo.py')
-rwxr-xr-xdemos/demo.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/demos/demo.py b/demos/demo.py
index 5252db7c..b9bf7c3f 100755
--- a/demos/demo.py
+++ b/demos/demo.py
@@ -28,7 +28,6 @@ import socket
import sys
import time
import traceback
-from paramiko.py3compat import input
import paramiko
@@ -61,9 +60,7 @@ def agent_auth(transport, username):
def manual_auth(username, hostname):
default_auth = "p"
- auth = input(
- "Auth by (p)assword, (r)sa key, or (d)ss key? [%s] " % default_auth
- )
+ auth = input("Auth by (p)assword, (r)sa key, or (d)ss key? [%s] " % default_auth)
if len(auth) == 0:
auth = default_auth
@@ -130,14 +127,10 @@ try:
sys.exit(1)
try:
- keys = paramiko.util.load_host_keys(
- os.path.expanduser("~/.ssh/known_hosts")
- )
+ keys = paramiko.util.load_host_keys(os.path.expanduser("~/.ssh/known_hosts"))
except IOError:
try:
- keys = paramiko.util.load_host_keys(
- os.path.expanduser("~/ssh/known_hosts")
- )
+ keys = paramiko.util.load_host_keys(os.path.expanduser("~/ssh/known_hosts"))
except IOError:
print("*** Unable to open host keys file")
keys = {}