transit: allow port to be a 'long'

This commit is contained in:
Brian Warner 2017-02-24 18:30:32 -08:00
parent cf9053637c
commit b7ff5f05d5

View File

@ -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)