From 3e7ae3aeb57866acb85b0459cc3cc47799f69180 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 16 Apr 2010 15:35:40 +0000 Subject: [PATCH] Protect from unknown types---just mark as unknown svn: r15162 --- src/gen/lib/grampstype.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gen/lib/grampstype.py b/src/gen/lib/grampstype.py index fa3cbf105..b8e72fb23 100644 --- a/src/gen/lib/grampstype.py +++ b/src/gen/lib/grampstype.py @@ -177,8 +177,10 @@ class GrampsType(object): """ if self.__value == self._CUSTOM: return self.__string - else: + elif self.__value in self._I2EMAP: return self._I2EMAP[self.__value] + else: + return _UNKNOWN def serialize(self): """Convert the object to a serialized tuple of data. """