From e2fc32c4c0932a72d18251385a8cfe678d7e3cce Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 3 Jan 2013 11:19:05 +0000 Subject: [PATCH] Fix exec problem in python 2 after previous change svn: r20954 --- gramps/gen/display/name.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gramps/gen/display/name.py b/gramps/gen/display/name.py index 004e315e4..d499bb6d9 100644 --- a/gramps/gen/display/name.py +++ b/gramps/gen/display/name.py @@ -54,6 +54,7 @@ Specific symbols for parts of a name are defined: # #------------------------------------------------------------------------- from ..ggettext import sgettext as _ +import sys import re import logging LOG = logging.getLogger(".gramps.gen") @@ -1050,7 +1051,7 @@ def fn(%s): return p + str + s return cleanup_name("%s" %% (%s))""" % (args, new_fmt, ",".join(param)) try: - exec(s) + exec(s) in globals(), locals() return locals()['fn'] except: LOG.error("\n" + 'Wrong name format string %s' % new_fmt