From: Victor Godoy Poluceno Date: Thu, 3 Sep 2009 16:31:59 +0000 (-0300) Subject: Added error callback to twisted X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e7107ec8f5dc797ab96cb1b7cdd585d74e34c95;p=libchamplain Added error callback to twisted --- diff --git a/bindings/python/demos/url-marker.py b/bindings/python/demos/url-marker.py index d112165..5bdf2ac 100644 --- a/bindings/python/demos/url-marker.py +++ b/bindings/python/demos/url-marker.py @@ -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):