diff options
author | magmaus3 <magmaus3@disroot.org> | 2023-02-14 12:36:10 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-08-02 22:07:45 +0200 |
commit | 4753b3619dd0f08185c16e3d3d60b98afdbaa040 (patch) | |
tree | 62b2ad6b595977471f649671ae7c5bb66282088c /demos/demo.py | |
parent | d5117fc7988e3ede445ca09d7ffc95d4263445c3 (diff) |
Don't use functions from nonexistent py3compat module in demos.py3compat
commit 36bafee8af15d7743fd9f16b7a6b146b4e90de0e
Author: magmaus3 <magmaus3@disroot.org>
Date: Tue Feb 14 12:36:10 2023 +0100
Don't use functions from nonexistent py3compat module in demos.
Diffstat (limited to 'demos/demo.py')
-rwxr-xr-x | demos/demo.py | 13 |
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 = {} |