Module: deluge
Branch: master
Commit: c4b20aa595892bf12083bb55aa671b34723a88cc

Author: Andrew Resch <[email protected]>
Date:   Mon May  3 13:24:54 2010 -0700

Fix error when requesting a tracker icon for None

---

 deluge/ui/gtkui/torrentview.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py
index 6ea75fd..1005c15 100644
--- a/deluge/ui/gtkui/torrentview.py
+++ b/deluge/ui/gtkui/torrentview.py
@@ -100,8 +100,12 @@ def cell_data_trackericon(column, cell, model, row, data):
         if cell.get_property("pixbuf") != icon:
             cell.set_property("pixbuf", icon)
 
-    d = component.get("TrackerIcons").get(model[row][data])
-    d.addCallback(on_get_icon)
+    host = model[row][data]
+    if host:
+        d = component.get("TrackerIcons").get(model[row][data])
+        d.addCallback(on_get_icon)
+    else:
+        on_get_icon(None)
 
 def cell_data_progress(column, cell, model, row, data):
     """Display progress bar with text"""

-- 
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.

Reply via email to