Skip to content
Permalink
Browse files

Ensure a unicode string is returned

  • Loading branch information...
seahawk1986 committed May 16, 2019
1 parent c522d19 commit 23e54c67a7410ce8de6ffb55ab2e7b0a9c8212d8
Showing with 3 additions and 2 deletions.
  1. +3 −2 filter_plugins/translate_yavdr.py
@@ -15,14 +15,15 @@
import gettext
from ansible.errors import AnsibleFilterError
from ansible.utils import helpers
from ansible.module_utils._text import to_text


def translate_yavdr(text):
gettext.textdomain('yavdr')
try:
return gettext.gettext(text)
return to_text(gettext.gettext(text))
except:
return text
return to_text(text)

# ---- Ansible filters ----
class FilterModule(object):

0 comments on commit 23e54c6

Please sign in to comment.
You can’t perform that action at this time.