]> err.no Git - libchamplain/commitdiff
Added error callback to twisted
authorVictor Godoy Poluceno <victorpoluceno@gmail.com>
Thu, 3 Sep 2009 16:31:59 +0000 (13:31 -0300)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 3 Sep 2009 23:56:46 +0000 (19:56 -0400)
bindings/python/demos/url-marker.py

index d1121655264d9be9125b6011ddddbc12e1e3c9c3..5bdf2ac7b403e9a817023557de534135e1b241b5 100644 (file)
@@ -49,9 +49,14 @@ def image_download_cb(data, layer, latitude, longitude, url):
     marker.show_all()
 
 
+def image_download_errcb(error):
+    print error
+
+
 def create_marker_from_url(layer, latitude, longitude, url):
     d = httpclient.getPage(url)
     d.addCallback(image_download_cb, layer, latitude, longitude, url)
+    d.addErrback(image_download_errcb)
 
 
 def event_cb(stage, event):