Module: deluge Branch: chunked-sessionproxy-and-gtkui-speedups Commit: 238a21cc50af58963e1c5a8ce63e9f42ab7cd00b
Author: Pedro Algarvio <[email protected]> Date: Tue May 17 19:16:23 2011 +0100 Don't fail if we still don't have full statuses. --- deluge/ui/sessionproxy.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/sessionproxy.py b/deluge/ui/sessionproxy.py index 29ce7b3..9704c59 100644 --- a/deluge/ui/sessionproxy.py +++ b/deluge/ui/sessionproxy.py @@ -269,8 +269,8 @@ class SessionProxy(component.Component): def on_torrent_state_changed(self, torrent_id, state): if torrent_id in self.torrents: - self.torrents[torrent_id][1]["state"] = state - self.cache_times[torrent_id]["state"] = time.time() + self.torrents[torrent_id][1].setdefault("state", state) + self.cache_times.setdefault(torrent_id, {}).update(state=time.time()) def on_torrent_added(self, torrent_id, from_state): self.torrents[torrent_id] = [time.time() - self.cache_time - 1, {}] -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
