[Core] Remove int casting as args should be int

This commit is contained in:
Calum Lind 2015-11-15 14:14:12 +00:00
parent 27bf05f2fe
commit c796acf791
1 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ class Torrent(object):
elif max_connections == 1:
max_connections = 2
self.options["max_connections"] = int(max_connections)
self.options["max_connections"] = max_connections
self.handle.set_max_connections(max_connections)
def set_max_upload_slots(self, max_slots):
@ -331,7 +331,7 @@ class Torrent(object):
Args:
max_slots (int): Maximum upload slots
"""
self.options["max_upload_slots"] = int(max_slots)
self.options["max_upload_slots"] = max_slots
self.handle.set_max_uploads(max_slots)
def set_max_upload_speed(self, m_up_speed):
@ -1104,7 +1104,7 @@ class Torrent(object):
bool: True is successful, otherwise False
"""
try:
self.handle.connect_peer((peer_ip, int(peer_port)), 0)
self.handle.connect_peer((peer_ip, peer_port), 0)
except RuntimeError as ex:
log.debug("Unable to connect to peer: %s", ex)
return False