Skip to content

Commit

Permalink
Revert "Blank line fixes courtesy of black"
Browse files Browse the repository at this point in the history
This reverts commit 4620884.
  • Loading branch information
ReK42 committed Jul 9, 2023
1 parent 2d058ac commit 419218f
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions netmiko/adva/adva_aos_fsp_150_f2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def set_base_prompt(
delay_factor: float = 1.0,
pattern: Optional[str] = None,
) -> str:

prompt = self.find_prompt()
match = re.search(pri_prompt_terminator, prompt)
if not match:
Expand Down
2 changes: 2 additions & 0 deletions netmiko/adva/adva_aos_fsp_150_f3.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def set_base_prompt(
delay_factor: float = 1.0,
pattern: Optional[str] = None,
) -> str:

prompt = self.find_prompt()
match = re.search(pri_prompt_terminator, prompt)
if not match:
Expand All @@ -120,6 +121,7 @@ def send_config_set(
terminator: str = r"#",
bypass_commands: Optional[str] = None,
) -> str:

if bypass_commands is None:
categories = (
r"(?:superuser|crypto|maintenance|provisioning|retrieve|test-user)"
Expand Down
1 change: 1 addition & 0 deletions netmiko/apresia/apresia_aeos.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def disable_paging(
cmd_verify: bool = True,
pattern: Optional[str] = None,
) -> str:

self.enable()
check_command = f"show running-config | include {command}"
show_run = self._send_command_str(check_command)
Expand Down
6 changes: 6 additions & 0 deletions netmiko/audiocode/audiocode_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def set_base_prompt(
delay_factor: float = 1.0,
pattern: Optional[str] = None,
) -> str:

if pattern is None:
pattern = rf"\*?{self.prompt_pattern}"

Expand Down Expand Up @@ -59,6 +60,7 @@ def find_prompt(
delay_factor: float = 1.0,
pattern: Optional[str] = None,
) -> str:

if pattern is None:
pattern = rf"\*?{self.prompt_pattern}"
return super().find_prompt(
Expand Down Expand Up @@ -226,6 +228,7 @@ def disable_paging(
cmd_verify: bool = True,
pattern: Optional[str] = None,
) -> str:

if command:
return super().disable_paging(
command=command,
Expand Down Expand Up @@ -289,6 +292,7 @@ def disable_paging(
cmd_verify: bool = True,
pattern: Optional[str] = None,
) -> str:

if command:
return super().disable_paging(
command=command,
Expand Down Expand Up @@ -316,6 +320,7 @@ def _enable_paging(
self,
delay_factor: Optional[float] = 0.5,
) -> str:

command_list: List[str] = [
"cli-terminal",
"set window-height 100",
Expand Down Expand Up @@ -396,6 +401,7 @@ def send_config_set(
terminator: str = r"/.*>",
bypass_commands: Optional[str] = None,
) -> str:

return super().send_config_set(
config_commands=config_commands,
exit_config_mode=exit_config_mode,
Expand Down
2 changes: 2 additions & 0 deletions netmiko/base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ def read_until_pattern(
start_time = time.time()
# if read_timeout == 0 or 0.0 keep reading indefinitely
while (time.time() - start_time < read_timeout) or (not read_timeout):

output += self.read_channel()

if re.search(pattern, output, flags=re_flags):
Expand Down Expand Up @@ -1446,6 +1447,7 @@ def clear_buffer(
return output

def command_echo_read(self, cmd: str, read_timeout: float) -> str:

# Make sure you read until you detect the command echo (avoid getting out of sync)
new_data = self.read_until_pattern(
pattern=re.escape(cmd), read_timeout=read_timeout
Expand Down
2 changes: 2 additions & 0 deletions netmiko/centec/centec_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def save_config(


class CentecOSSSH(CentecOSBase):

pass


class CentecOSTelnet(CentecOSBase):

pass
1 change: 1 addition & 0 deletions netmiko/cisco/cisco_ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def __init__(
progress4: Optional[Callable[..., Any]] = None,
hash_supported: bool = True,
) -> None:

if not dest_file:
raise ValueError(
"Destination file must be specified for InlineTransfer operations."
Expand Down
2 changes: 2 additions & 0 deletions netmiko/cisco/cisco_wlc_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str:
kwargs["max_loops"] = 150

if "Press any key" in output or "Press Enter to" in output:

# Send an 'enter'
output += self._send_command_timing_str(*second_args, **kwargs)

# WLC has excessive delay after this appears on screen
if "802.11b Advanced Configuration" in output:

# Defaults to 30 seconds
time.sleep(kwargs["delay_factor"] * 30)
not_done = True
Expand Down
1 change: 1 addition & 0 deletions netmiko/dell/dell_isilon_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def enable(
check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:

delay_factor = self.select_delay_factor(delay_factor=1)
output = ""

Expand Down
1 change: 1 addition & 0 deletions netmiko/ericsson/ericsson_mltn.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(
*args: Any,
**kwargs: Any,
) -> None:

# Set default auth_timeout
if kwargs.get("auth_timeout") is None:
kwargs["auth_timeout"] = 20
Expand Down
1 change: 1 addition & 0 deletions netmiko/hp/hp_procurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def cleanup(self, command: str = "logout") -> None:

output = ""
for _ in range(10):

# The connection might be dead here.
try:
# "Do you want to log out"
Expand Down
1 change: 1 addition & 0 deletions netmiko/nokia/nokia_srl.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def check_config_mode(
pattern: str = r"#",
force_regex: bool = True,
) -> bool:

return super().check_config_mode(
check_string=check_string, pattern=pattern, force_regex=force_regex
)
Expand Down
1 change: 1 addition & 0 deletions netmiko/paloalto/paloalto_panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SSHClient_interactive(SSHClient):
def pa_banner_handler(
self, title: str, instructions: str, prompt_list: List[Tuple[str, bool]]
) -> List[str]:

resp = []
for prompt, echo in prompt_list:
if "Do you accept" in prompt:
Expand Down
1 change: 1 addition & 0 deletions netmiko/raisecom/raisecom_roap.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def telnet_login(
delay_factor: float = 1.0,
max_loops: int = 20,
) -> str:

# set callback function to handle telnet options.
assert isinstance(self.remote_conn, Telnet)
self.remote_conn.set_option_negotiation_callback(self._process_option)
Expand Down
1 change: 1 addition & 0 deletions netmiko/ruijie/ruijie_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def save_config(


class RuijieOSSSH(RuijieOSBase):

pass


Expand Down
1 change: 1 addition & 0 deletions netmiko/sixwind/sixwind_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,5 @@ def save_config(


class SixwindOSSSH(SixwindOSBase):

pass

0 comments on commit 419218f

Please sign in to comment.