From d58462949faa00af77599f988596f6cb5d749a5c Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Fri, 30 Sep 2016 16:25:31 -0400 Subject: [PATCH] roll up of unicode fixes in junos modules (#5113) * fixes junos_template (fixes #3962) * fixes junos_config --- lib/ansible/modules/network/junos/_junos_template.py | 2 +- lib/ansible/modules/network/junos/junos_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/junos/_junos_template.py b/lib/ansible/modules/network/junos/_junos_template.py index c65525d8491..c50deeef2c5 100644 --- a/lib/ansible/modules/network/junos/_junos_template.py +++ b/lib/ansible/modules/network/junos/_junos_template.py @@ -144,7 +144,7 @@ def main(): "set per junos-pyez documentation") results = dict(changed=False) - results['_backup'] = str(module.config.get_config()).strip() + results['_backup'] = unicode(module.config.get_config()).strip() try: diff = module.config.load_config(src, commit=commit, replace=replace, diff --git a/lib/ansible/modules/network/junos/junos_config.py b/lib/ansible/modules/network/junos/junos_config.py index 3b5fdd1d1bb..94d4ff89439 100644 --- a/lib/ansible/modules/network/junos/junos_config.py +++ b/lib/ansible/modules/network/junos/junos_config.py @@ -213,7 +213,7 @@ def config_to_commands(config): return commands def diff_commands(commands, config): - config = [str(c).replace("'", '') for c in config] + config = [unicode(c).replace("'", '') for c in config] updates = list() visited = set()