Teradata / PyTd

A Python Module to make it easy to script powerful interactions with Teradata Database in a DevOps friendly way.
MIT License
108 stars 43 forks source link

Fix unicode port conversion #68

Closed johnrc closed 7 years ago

johnrc commented 7 years ago

All key/value pairs from the config are converted to unicode but httplib does not accept unicode for the port; only number or string.

httplib.HTTPSConnection(u'example.com', u'1443')

This converts the host string to unicode by combining the host and port given (u"example.com:1443") and allowing httplib to parse the port out of the unicode.

httplib.HTTPSConnection(u"example.com:1443")

This error only shows up when the port is set in a configuration file.

escheie commented 7 years ago

Thanks for the pull request! Decided to fix this instead by converting the port to an int before passing it to httplib.

johnrc commented 7 years ago

Ok, great. That's a simpler fix. Thanks @escheie.