Skip to content

Commit

Permalink
Fix exit config mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Jul 28, 2017
1 parent 3b1955b commit 9c69e75
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions netmiko/paloalto/paloalto_panos_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,10 @@ def config_mode(self, config_command='configure'):
"""Enter configuration mode."""
return super(PaloAltoPanosSSH, self).config_mode(config_command=config_command)

def exit_config_mode(self, exit_config='exit'):
def exit_config_mode(self, exit_config='exit', pattern=r'>'):
"""Exit configuration mode."""
output = ""
if self.check_config_mode():
output = self.send_command(exit_config, strip_prompt=False, strip_command=False)
if self.check_config_mode():
raise ValueError("Failed to exit configuration mode")
return output
return super(PaloAltoPanosSSH, self).exit_config_mode(exit_config=exit_config,
pattern=pattern)

def commit(self, force=False, partial=False, device_and_network=False,
policy_and_objects=False, vsys='', no_vsys=False, delay_factor=.1):
Expand Down

0 comments on commit 9c69e75

Please sign in to comment.