mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-14 05:26:28 +00:00
Fix unhandled exception when adding a torrent to the session
This commit is contained in:
parent
b41aa808be
commit
5501094214
@ -241,9 +241,9 @@ class SessionProxy(component.Component):
|
|||||||
|
|
||||||
def on_torrent_added(self, torrent_id):
|
def on_torrent_added(self, torrent_id):
|
||||||
self.torrents[torrent_id] = [time.time() - self.cache_time - 1, {}]
|
self.torrents[torrent_id] = [time.time() - self.cache_time - 1, {}]
|
||||||
|
self.cache_times[torrent_id] = {}
|
||||||
def on_status(status):
|
def on_status(status):
|
||||||
self.torrents[torrent_id][1].update(status)
|
self.torrents[torrent_id][1].update(status)
|
||||||
self.cache_times[torrent_id] = {}
|
|
||||||
t = time.time()
|
t = time.time()
|
||||||
for key in status:
|
for key in status:
|
||||||
self.cache_times[torrent_id][key] = t
|
self.cache_times[torrent_id][key] = t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user