Skip to content

Commit

Permalink
attempting to fix dependency issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Gatorjosh14 committed Oct 26, 2023
1 parent 76ce2f2 commit b0bc491
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions netmiko/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def check_python_version(): # type: ignore
from netmiko.ssh_autodetect import SSHDetect # noqa
from netmiko.base_connection import BaseConnection # noqa
from netmiko.scp_functions import file_transfer, progress_bar # noqa
from netmiko.telnet_proxy import TelnetProxy #noqa

# Alternate naming
Netmiko = ConnectHandler
Expand Down Expand Up @@ -90,6 +91,7 @@ def check_python_version(): # type: ignore
"Netmiko",
"file_transfer",
"progress_bar",
"TelnetProxy",
)

# Cisco cntl-shift-six sequence
Expand Down
4 changes: 2 additions & 2 deletions netmiko/base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import re
import socket
import telnetlib
import telnet_proxy
import time
from collections import deque
from os import path
Expand Down Expand Up @@ -62,6 +61,7 @@
calc_old_timeout,
)
from netmiko.utilities import m_exec_time # noqa
from netmiko.telnet_proxy import TelnetProxy

if TYPE_CHECKING:
from os import PathLike
Expand Down Expand Up @@ -1090,7 +1090,7 @@ def establish_connection(self, width: int = 511, height: int = 1000) -> None:
self.channel: Channel
if self.protocol == "telnet":
if self.sock:
self.remote_conn = telnet_proxy.Telnet(
self.remote_conn = TelnetProxy(
self.host,
port=self.port,
timeout=self.timeout,
Expand Down
3 changes: 1 addition & 2 deletions netmiko/telnet_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

__all__ = ["Telnet"]


class Telnet(telnetlib.Telnet):
class TelnetProxy(telnetlib.Telnet):
def __init__(
self, host=None, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, proxy_dict=None
):
Expand Down

0 comments on commit b0bc491

Please sign in to comment.