From 7e7107ec8f5dc797ab96cb1b7cdd585d74e34c95 Mon Sep 17 00:00:00 2001 From: Victor Godoy Poluceno Date: Thu, 3 Sep 2009 13:31:59 -0300 Subject: [PATCH] Added error callback to twisted --- bindings/python/demos/url-marker.py | 5 +++++ 1 file changed, 5 insertions(+) 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): -- 2.39.5