summaryrefslogtreecommitdiff
path: root/network/junos/junos_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'network/junos/junos_config.py')
-rw-r--r--network/junos/junos_config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/network/junos/junos_config.py b/network/junos/junos_config.py
index 5e2ead6a..f0814a0b 100644
--- a/network/junos/junos_config.py
+++ b/network/junos/junos_config.py
@@ -214,7 +214,7 @@ def diff_commands(commands, config):
updates = list()
visited = set()
- for item in commands.split('\n'):
+ for item in commands:
if len(item) > 0:
if not item.startswith('set') and not item.startswith('delete'):
raise ValueError('line must start with either `set` or `delete`')
@@ -232,6 +232,8 @@ def diff_commands(commands, config):
def load_config(module, result):
candidate = module.params['lines'] or module.params['src']
+ if isinstance(candidate, basestring):
+ candidate = candidate.split('\n')
kwargs = dict()
kwargs['comment'] = module.params['comment']