Skip to content

Commit

Permalink
Merge pull request napalm-automation-community#73 from itdependsnetwo…
Browse files Browse the repository at this point in the history
…rks/split_str

update splitlines on string of config
  • Loading branch information
itdependsnetworks authored Oct 13, 2019
2 parents 7c88c89 + 2b54433 commit 06e404f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions napalm_panos/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,11 @@ def _send_merge_commands(self, config, file_config):
if self.ssh_connection is False:
self._open_ssh()

if file_config:
if isinstance(config, str):
if isinstance(config, str):
if file_config:
config = config.splitlines()
else:
if isinstance(config, str):
config = str(config).split()
else:
config = str(config).splitlines()

self.ssh_device.send_config_set(config)
self.loaded = True
Expand Down

0 comments on commit 06e404f

Please sign in to comment.