From 2b544333640486e930216973e3b4a06998116531 Mon Sep 17 00:00:00 2001 From: itdependsnetworks Date: Sun, 13 Oct 2019 14:07:02 -0400 Subject: [PATCH] update splitlines on string of config --- napalm_panos/panos.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/napalm_panos/panos.py b/napalm_panos/panos.py index fe5ddd3..844d58c 100644 --- a/napalm_panos/panos.py +++ b/napalm_panos/panos.py @@ -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