http://www.gramps-project.org/bugs/view.php?id=2623#c26969 make handle safe
svn: r21101
This commit is contained in:
parent
7fc4d4ec3f
commit
8369658800
@ -20,10 +20,14 @@
|
|||||||
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
from gramps.gen.constfunc import UNITYPE
|
||||||
|
|
||||||
class Handle:
|
class Handle:
|
||||||
def __init__(self, classname, handle):
|
def __init__(self, classname, handle):
|
||||||
""" Class to hold type and handle of referenced item """
|
""" Class to hold type and handle of referenced item """
|
||||||
self.classname = classname
|
self.classname = classname
|
||||||
|
if not isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.decode('utf-8')
|
||||||
self.handle = handle
|
self.handle = handle
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user