From 8d5770d8cc93e7e2dc4b1a64c9da2ce36bb33eac Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 24 Feb 2017 18:30:51 -0800 Subject: [PATCH] tor_manager: allow port to be a 'long' --- src/wormhole/tor_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wormhole/tor_manager.py b/src/wormhole/tor_manager.py index be1e38a..85834bc 100644 --- a/src/wormhole/tor_manager.py +++ b/src/wormhole/tor_manager.py @@ -1,5 +1,6 @@ from __future__ import print_function, unicode_literals import sys, re +import six from twisted.internet.defer import inlineCallbacks, returnValue from twisted.internet.error import ConnectError from twisted.internet.endpoints import clientFromString @@ -153,7 +154,7 @@ class TorManager: return False def get_endpoint_for(self, host, port): - assert isinstance(port, int) + assert isinstance(port, six.integer_types) if self.is_non_public_numeric_address(host): return None