Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: PORT is not a number when explicitly passing a string value to ssh_address_or_host #150

Closed
p0lm opened this issue May 10, 2019 · 0 comments

Comments

@p0lm
Copy link

p0lm commented May 10, 2019

When explicitly passing ssh_address_or_host a string value AssertionError: PORT is not a number is thrown.

sshtunnel.open_tunnel('1.1.1.1', **kwargs) # works
sshtunnel.open_tunnel(ssh_address_or_host='1.1.1.1', **kwargs) # fails
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "(...)\site-packages\sshtunnel.py", line 1625, in open_tunnel
    forwarder = SSHTunnelForwarder(*args, **kwargs)
  File "(...)\site-packages\sshtunnel.py", line 864, in __init__
    check_address(ssh_address_or_host)
  File "(...)\site-packages\sshtunnel.py", line 109, in check_address
    check_port(address[1])
  File "(...)\site-packages\sshtunnel.py", line 84, in check_port
    assert isinstance(port, int), 'PORT is not a number'
AssertionError: PORT is not a number
fernandezcuesta added a commit that referenced this issue Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant