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.
pull/18777/head
Ganesh Nalawade 8 years ago committed by Matt Clay
parent 2ba5967673
commit d39ae36ab1

@ -245,7 +245,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

Loading…
Cancel
Save