* src/DisplayModels.py: handle a closed database in on_get_value

* src/PeopleModel.py: handle a closed database in on_get_value


svn: r3509
This commit is contained in:
Don Allingham 2004-08-25 03:37:48 +00:00
parent 2c2655d899
commit 1f12cdd680
3 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,8 @@
* src/ReadXML.py: Fix file copy problem, handle copy failure * src/ReadXML.py: Fix file copy problem, handle copy failure
* src/ImageSelect.py: Display GRAMPS ID, not DB handle * src/ImageSelect.py: Display GRAMPS ID, not DB handle
* src/WriteGedcom.py: handle image file problems when exporting * src/WriteGedcom.py: handle image file problems when exporting
* src/DisplayModels.py: handle a closed database in on_get_value
* src/PeopleModel.py: handle a closed database in on_get_value
2004-08-24 Martin Hawlisch <loshawlos@users.sourceforge.net> 2004-08-24 Martin Hawlisch <loshawlos@users.sourceforge.net>
* src/plugins/WebPage.py: web page enhancements, including * src/plugins/WebPage.py: web page enhancements, including

View File

@ -81,7 +81,10 @@ class BaseModel(gtk.GenericTreeModel):
return None return None
def on_get_value(self,iter,col): def on_get_value(self,iter,col):
return self.fmap[col](self.map[str(iter)]) try:
return self.fmap[col](self.map[str(iter)])
except:
return u''
def on_iter_next(self, node): def on_iter_next(self, node):
'''returns the next node at this level of the tree''' '''returns the next node at this level of the tree'''

View File

@ -204,8 +204,10 @@ class PeopleModel(gtk.GenericTreeModel):
else: else:
return u'' return u''
else: else:
val = self.fmap[col](self.db.person_map[str(iter)]) try:
return val return self.fmap[col](self.db.person_map[str(iter)])
except:
return u''
def reset_visible(self): def reset_visible(self):
self.visible = {} self.visible = {}