From 6fa7b7555047db4860352a49d7e64a677bc8ec98 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 15 Jan 2013 08:49:22 +0000 Subject: [PATCH] factor out double handle2internal svn: r21127 --- gramps/gen/db/undoredo.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/gramps/gen/db/undoredo.py b/gramps/gen/db/undoredo.py index ac8c0ead9..9303621df 100644 --- a/gramps/gen/db/undoredo.py +++ b/gramps/gen/db/undoredo.py @@ -53,7 +53,7 @@ from ..ggettext import gettext as _ # Gramps modules # #------------------------------------------------------------------------- -from ..constfunc import conv_to_unicode +from ..constfunc import conv_to_unicode, handle2internal from .dbconst import * from . import BSDDBTxn from ..errors import DbError @@ -69,17 +69,6 @@ DBERRS = (db.DBRunRecoveryError, db.DBAccessError, _SIGBASE = ('person', 'family', 'source', 'event', 'media', 'place', 'repository', 'reference', 'note', 'tag', 'citation') -#------------------------------------------------------------------------- -# -# Helper functions -# -#------------------------------------------------------------------------- -# handle in database is bytes, while internally Gramps wants unicode for py3 -if sys.version_info[0] < 3: - handle2internal = lambda x: x -else: - handle2internal = lambda x: conv_to_unicode(x, 'utf-8') - #------------------------------------------------------------------------- # # DbUndo class