diff --git a/ChangeLog b/ChangeLog index 23b762678..bdf4be3d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-06-24 Alex Roitman + * src/NameDisplay.py (_gen_cooked_func,_gen_raw_func): Do not + replace %% with anything. + 2007-06-24 Don Allingham * configure.in: add files * src/DataViews/_RelationView.py: fix translation argument diff --git a/src/BasicUtils/NameDisplay.py b/src/BasicUtils/NameDisplay.py index eed406706..1c4fe3940 100644 --- a/src/BasicUtils/NameDisplay.py +++ b/src/BasicUtils/NameDisplay.py @@ -281,7 +281,7 @@ class NameDisplay: "%S":"raw_data[_SUFFIX].upper()", "%Y":"raw_data[_PATRONYM].upper()", "%C":"raw_data[_CALL].upper()", - "%%":"'%'"} + } new_fmt = format_str @@ -302,13 +302,12 @@ class NameDisplay: new_fmt = new_fmt.replace("%S","%s") new_fmt = new_fmt.replace("%Y","%s") new_fmt = new_fmt.replace("%C","%s") - new_fmt = new_fmt.replace("%%",'%') # find each format flag in the original format string # for each one we find the variable name that is needed to # replace it and add this to a list. This list will be used # generate the replacement tuple. - pat = re.compile("%.") + pat = re.compile('|'.join(d.keys())) param = () mat = pat.search(format_str) @@ -356,8 +355,7 @@ class NameDisplay: "%S":"suffix.upper()", "%Y":"patronymic.upper()", "%C":"call.upper()", - "%%":"'%'"} - + } new_fmt = format_str @@ -378,7 +376,6 @@ class NameDisplay: new_fmt = new_fmt.replace("%S","%s") new_fmt = new_fmt.replace("%Y","%s") new_fmt = new_fmt.replace("%C","%s") - new_fmt = new_fmt.replace("%%",'%') # find each format flag in the original format string # for each one we find the variable name that is needed to