* 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 b85614c491
commit 6223685b34
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/ImageSelect.py: Display GRAMPS ID, not DB handle
* 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>
* src/plugins/WebPage.py: web page enhancements, including

View File

@ -81,7 +81,10 @@ class BaseModel(gtk.GenericTreeModel):
return None
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):
'''returns the next node at this level of the tree'''

View File

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