summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Nalawade <ganesh634@gmail.com>2016-11-22 21:28:14 +0530
committerJohn R Barker <john@johnrbarker.com>2016-11-22 15:58:14 +0000
commit7434c14c4300cb4511f4fe4374b747ab8148d502 (patch)
tree57516213202da39c620095cb66bb9bf1458ba87a
parent551f09e6c502aba94dc9621f2090a2bed51b71c5 (diff)
downloadansible-modules-core-7434c14c4300cb4511f4fe4374b747ab8148d502.tar.gz
Fix 5646 junos_config issue if config format is text (#5658)
If 'src_format' is not mentioned in playbook and config is in text format a list object is passed to 'guess_format' function instead of string, hence TypeError execption is seen. Fix is to pass string object instead of list.
-rw-r--r--network/junos/junos_config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/network/junos/junos_config.py b/network/junos/junos_config.py
index f0814a0b..af013476 100644
--- a/network/junos/junos_config.py
+++ b/network/junos/junos_config.py
@@ -242,7 +242,7 @@ def load_config(module, result):
kwargs['commit'] = not module.check_mode
if module.params['src']:
- config_format = module.params['src_format'] or guess_format(candidate)
+ config_format = module.params['src_format'] or guess_format(str(candidate))
elif module.params['lines']:
config_format = 'set'
kwargs['config_format'] = config_format