Skip to content

Commit 44edffd

Browse files
authored
Merge pull request #70 from mikebonnet/stomp-sni-py3
stomp.py: use six.text_type() instead of decode()
2 parents da971e5 + 2350249 commit 44edffd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

moksha.hub/moksha/hub/stomp/stomp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def connect(self, address, key=None, crt=None):
9191
import service_identity
9292
# connect SSL/TLS with SNI support (https://twistedmatrix.com/trac/ticket/5190)
9393
# This requires service_identity module: https://pypi.python.org/pypi/service_identity
94-
ssl_context = ssl.optionsForClientTLS(host.decode('utf-8'), clientCertificate=client_cert)
94+
ssl_context = ssl.optionsForClientTLS(six.text_type(host), clientCertificate=client_cert)
9595
except ImportError:
9696
log.warn("Connecting without SNI support due to absence of service_identity module.")
9797
ssl_context = client_cert.options()

0 commit comments

Comments
 (0)