From 652a1f132b1ed6355a9a15d31f0c7b11d96310d2 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 3 May 2010 01:07:24 +0000 Subject: [PATCH] 3911: Crash because of syntax error in name format svn: r15302 --- src/gen/display/name.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gen/display/name.py b/src/gen/display/name.py index c54dc6899..1b975bcef 100644 --- a/src/gen/display/name.py +++ b/src/gen/display/name.py @@ -393,11 +393,14 @@ class NameDisplay(object): ] format_str = format_str[1:] else: - patterns = [",\W*\(%(" + ("|".join(codes)) + ")\)", # ,\W*(%s) - ",\W*%(" + ("|".join(codes)) + ")", # ,\W*%s - "\(%(" + ("|".join(codes)) + ")\)", # (%s) - "%(" + ("|".join(codes)) + ")", # %s - ] + patterns = [ + ",\W*\"%(" + ("|".join(codes)) + ")\"", # ,\W*"%s" + ",\W*\(%(" + ("|".join(codes)) + ")\)", # ,\W*(%s) + ",\W*%(" + ("|".join(codes)) + ")", # ,\W*%s + "\"%(" + ("|".join(codes)) + ")\"", # "%s" + "\(%(" + ("|".join(codes)) + ")\)", # (%s) + "%(" + ("|".join(codes)) + ")", # %s + ] new_fmt = format_str # replace the specific format string flags with a