From b8ff094aa6325bb7b9528b245ca117a4313fee76 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Tue, 23 May 2006 21:30:42 +0000 Subject: [PATCH] * src/DataViews/_MapView.py: Catch exceptions of the PixbufLoader that occur if nothing or not an image have been downloaded. svn: r6765 --- ChangeLog | 4 ++++ src/DataViews/_MapView.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dde60ca65..063106065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-05-23 Martin Hawlisch + * src/DataViews/_MapView.py: Catch exceptions of the PixbufLoader that + occur if nothing or not an image have been downloaded. + 2006-05-23 Don Allingham * src/DataViews/_RelationView.py: finish shading * src/GrampsDb/_DbUtils.py: add birth/death index set funcion diff --git a/src/DataViews/_MapView.py b/src/DataViews/_MapView.py index 152e9254c..36a4b97cd 100644 --- a/src/DataViews/_MapView.py +++ b/src/DataViews/_MapView.py @@ -327,7 +327,10 @@ class WMSMapTile: print "no more content." self.handler_running = False self.url_handler.close() - self.pixbufloader.close() + try: + self.pixbufloader.close() + except gobject.GError: + pass # dont crash if nothing or not an image has been downloaded return False self.change_cb() return True @@ -355,7 +358,10 @@ class WMSMapTile: if enable_debug: print "stopping current download" self.url_handler.close() - self.pixbufloader.close() + try: + self.pixbufloader.close() + except gobject.GError: + pass # dont crash if nothing or not an image has been downloaded self.scaled_pixbuf = None self.url_handler = urllib.urlopen(self.map_get_url+params) self.handler_running = gobject.idle_add(self.idle_handler)