Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #34 from mikhail-hul/master
Browse files Browse the repository at this point in the history
Version set to 1.5
  • Loading branch information
vtatai authored Dec 22, 2020
2 parents 3ee288b + 9b0ce63 commit efa6894
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: python
python:
- "2.7"
install:
- pip install .
- pip install coveralls
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

config = {
'name': 'thriftcli',
'version': 1.4,
'version': 1.5,
'description': 'Thrift CLI',
'author': 'Neel Virdy',
'packages': ['thriftcli'],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_thrift_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_init_ssl(self, mock_load_file, mock_call, mock_import_package, mock_tso
command = 'thrift -r -I . --gen py %s' % data.TEST_THRIFT_FILE
mock_call.assert_called_with(command, shell=True)
mock_import_package.assert_called_with(data.TEST_THRIFT_MODULE_NAME, data.TEST_THRIFT_PY_NAMESPACE)
mock_tsocket.assert_called_with(data.TEST_SERVER_HOSTNAME, data.TEST_SERVER_PORT,ssl_context=mock.ANY)
mock_tsocket.assert_called_with(data.TEST_SERVER_HOSTNAME, data.TEST_SERVER_PORT,ca_certs=None,validate_callback=mock.ANY)
self.assertTrue(mock_transport_open.called)
mock_finagle_protocol.assert_called()

Expand Down
2 changes: 1 addition & 1 deletion thriftcli/thrift_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _open_connection(self, address):
ssl_context.verify_mode = verifier_type
self._transport = TSSLSocket.TSSLSocket(url, port, ca_certs=self._tls_key_path,
validate_callback=lambda cert, hostname: None) # disabling hostname validation
else:
else:
if self._proxy:
proxy_host, proxy_port = self._proxy.split(":")
self._transport = TProxySocket(proxy_host, proxy_port, url, port)
Expand Down

0 comments on commit efa6894

Please sign in to comment.