Skip to content

Commit

Permalink
Fix cmd_verify and null character
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed May 13, 2020
1 parent 3cd0c0d commit 0b62d52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions napalm/nxos_ssh/nxos_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,13 @@ def open(self):
def close(self):
self._netmiko_close()

def _send_command(self, command, raw_text=False):
def _send_command(self, command, raw_text=False, cmd_verify=True):
"""
Wrapper for Netmiko's send_command method.
raw_text argument is not used and is for code sharing with NX-API.
"""
return self.device.send_command(command)
return self.device.send_command(command, cmd_verify=cmd_verify)

def _send_command_list(self, commands, expect_string=None):
"""Wrapper for Netmiko's send_command method (for list of commands."""
Expand Down Expand Up @@ -506,7 +506,7 @@ def is_alive(self):
return {"is_alive": False}
else:
# Try sending ASCII null byte to maintain the connection alive
self._send_command(null)
self._send_command(null, command_verify=False)
except (socket.error, EOFError):
# If unable to send, we can tell for sure that the connection is unusable,
# hence return False.
Expand Down

0 comments on commit 0b62d52

Please sign in to comment.