From a39b8baa7281bb7f54d025241c3917ab22003548 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Mon, 25 Feb 2008 01:22:46 +0000 Subject: [PATCH] Ensure int-ness for max-connections and upload-slots of torrents. --- deluge/core/torrent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 13e465277..4a8e6a32e 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -110,12 +110,12 @@ class Torrent: self.tracker_status = status def set_max_connections(self, max_connections): - self.max_connections = max_connections - self.handle.set_max_connections(max_connections) + self.max_connections = int(max_connections) + self.handle.set_max_connections(self.max_connections) def set_max_upload_slots(self, max_slots): - self.max_upload_slots = max_slots - self.handle.set_max_uploads(max_slots) + self.max_upload_slots = int(max_slots) + self.handle.set_max_uploads(self.max_upload_slots) def set_max_upload_speed(self, m_up_speed): self.max_upload_speed = m_up_speed