diff --git a/lib/ansible/module_utils/_text.py b/lib/ansible/module_utils/_text.py index cf075e3bb4..173bbf4a9d 100644 --- a/lib/ansible/module_utils/_text.py +++ b/lib/ansible/module_utils/_text.py @@ -173,12 +173,6 @@ def to_text(obj, encoding='utf-8', errors=None, nonstring='simplerepr'): else: errors = 'strict' - if errors is None: - if PY3: - errors = 'surrogateescape' - else: - errors = 'replace' - if isinstance(obj, binary_type): return obj.decode(encoding, errors)