FIX idna encoding issues
FIX idna encoding issues

On some machines passing an unicode string as host name triggers an
exception:

    python -c 'import socket; socket.create_connection((u"<some-host>", 8080));'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib64/python2.7/socket.py", line 554, in create_connection
        for res in getaddrinfo(host, port, 0, SOCK_STREAM):
    LookupError: unknown encoding: idna

Whereas using an str does not trigger the problem:

    python -c 'import socket; socket.create_connection(("<some-host>", 8080));'

This fix will convert the host name to a str making the error go away.

SUSE-Cloud/automation,aspiers/automation,gosipyan/automation,gosipyan/automation,aspiers/automation,aspiers/automation,gosipyan/automation,SUSE-Cloud/automation,SUSE-Cloud/automation,gosipyan/automation,SUSE-Cloud/automation,aspiers/automation