diff options
Diffstat (limited to 'deluge/core/torrent.py')
-rw-r--r-- | deluge/core/torrent.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index f40b58834..b69909cbb 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -1212,8 +1212,8 @@ class Torrent(object): bool: True is successful, otherwise False """ try: - self.handle.connect_peer((peer_ip, peer_port), 0) - except RuntimeError as ex: + self.handle.connect_peer((peer_ip, int(peer_port)), 0) + except (RuntimeError, ValueError) as ex: log.debug('Unable to connect to peer: %s', ex) return False return True |