Support Python 3

json.dumps() and yaml.safe_dump() return a str object on Python 2 and Python 3.
Therefore the unicode conversion is only needed for Python 2.

Bug-Debian: https://bugs.debian.org/889929
15 files changed