From b7ff5f05d53f714b4ae476b337f9cbf0f1ec00f3 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 24 Feb 2017 18:30:32 -0800 Subject: [PATCH] transit: allow port to be a 'long' --- src/wormhole/transit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wormhole/transit.py b/src/wormhole/transit.py index 0110c40..e0002a9 100644 --- a/src/wormhole/transit.py +++ b/src/wormhole/transit.py @@ -701,7 +701,8 @@ class Common: and isinstance(hint[u"hostname"], type(u""))): log.msg("invalid hostname in hint: %r" % (hint,)) return None - if not(u"port" in hint and isinstance(hint[u"port"], int)): + if not(u"port" in hint + and isinstance(hint[u"port"], six.integer_types)): log.msg("invalid port in hint: %r" % (hint,)) return None priority = hint.get(u"priority", 0.0)