Commit Graph

1 Commits (c58f0a7b8df3fb747d0c576731f0710fa961840a)

Author SHA1 Message Date
Pilou 2aa0f366d2 templar: ensure that exceptions are handled, fix 'AttributeError' (#48792)
* templar: ensure that exceptions are handled

* Fix AttributeError: object has no attribute 'message'

'message' attribute is deprecated since Python 2.6 and not available
with Python 3.

Simple reproducer:

    - hosts: localhost
      vars:
        not_json: "{{ 'test str' | from_json }}"
      tasks:
        - command: "echo {{ not_json }}"

(cherry picked from commit 62c05033d6)
6 years ago