diff options
author | Peter Sprygada <privateip@users.noreply.github.com> | 2016-10-13 15:06:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 15:06:50 -0400 |
commit | 6795954dc80c444e608e3b26a3c5666fb28847a3 (patch) | |
tree | 1a2bf60766d782b0d1cf8e506c58cc4d23b2c659 | |
parent | 312f578f93a13d21b6d5ab45c1dd0bdf8685ef54 (diff) | |
download | ansible-modules-core-6795954dc80c444e608e3b26a3c5666fb28847a3.tar.gz |
fixes bug introduced in 3670215 in junos_config (#5251)
The previous fix created a new bug that this PR resolves
-rw-r--r-- | network/junos/junos_config.py | 4 |
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'] |