* src/DataViews/_MapView.py: Catch exceptions of the PixbufLoader that occur if nothing or not an image have been downloaded.

svn: r6765
This commit is contained in:
Martin Hawlisch 2006-05-23 21:30:42 +00:00
parent 74b55ce32a
commit b8ff094aa6
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2006-05-23 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* 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 <don@gramps-project.org>
* src/DataViews/_RelationView.py: finish shading
* src/GrampsDb/_DbUtils.py: add birth/death index set funcion

View File

@ -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)