
Strings are used where they were encoded to bytes and cast back to strings before. The StringIO module is imported to retain backwards compatibility with Python 2.7. Also, the convert_2_string function is removed and its usage replaced with Ansible's to_text function. Change-Id: I396d96b8047e653f4526350375abc1f5f0dcd756 Fixes-Bug: 1711347