fixed subtl.py from trying to parse a port string as integer

This commit is contained in:
thoffma 2015-01-18 22:52:00 +01:00
parent b37e309eda
commit fdf88d997f
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ class UdpTrackerClient:
# Check and raise if missing fields
self._check_fields(args, fields)
# Convert argument port from string to integer for correct struct.pack execution
args['port'] = int(args['port'])
# Humans tend to use hex representations of the hash. Wasteful humans.
args['info_hash'] = norm_info_hash(args['info_hash'])