From 7a5e277b3815485a427343a4dca96fb1d8971b69 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 13 Jan 2013 17:07:44 +0000 Subject: [PATCH] http://www.gramps-project.org/bugs/view.php?id=2623#c26969 make handle safe svn: r21101 --- gramps/gen/lib/handle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gramps/gen/lib/handle.py b/gramps/gen/lib/handle.py index 342d248c9..e98eecb16 100644 --- a/gramps/gen/lib/handle.py +++ b/gramps/gen/lib/handle.py @@ -20,10 +20,14 @@ # $Id$ + from gramps.gen.constfunc import UNITYPE + class Handle: def __init__(self, classname, handle): """ Class to hold type and handle of referenced item """ self.classname = classname + if not isinstance(handle, UNITYPE): + handle = handle.decode('utf-8') self.handle = handle def __repr__(self):