diff options
Diffstat (limited to 'lib/ansible/modules/network/junos/junos_facts.py')
-rw-r--r-- | lib/ansible/modules/network/junos/junos_facts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/modules/network/junos/junos_facts.py b/lib/ansible/modules/network/junos/junos_facts.py index db9357b509..1f47e35ae6 100644 --- a/lib/ansible/modules/network/junos/junos_facts.py +++ b/lib/ansible/modules/network/junos/junos_facts.py @@ -65,7 +65,7 @@ ansible_facts: """ import re -from xml.etree.ElementTree import Element, SubElement +from xml.etree.ElementTree import Element, SubElement, tostring from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import iteritems @@ -89,7 +89,7 @@ class FactsBase(object): reply = command(self.module, command) output = reply.find('.//output') if not output: - module.fail_json(msg='failed to retrieve facts for command %s' % command) + self.module.fail_json(msg='failed to retrieve facts for command %s' % command) return str(output.text).strip() def rpc(self, rpc): |