Merge "Sync oslo gettextutils"

This commit is contained in:
Jenkins 2013-08-08 07:53:21 +00:00 committed by Gerrit Code Review
commit 6e8922c791

View File

@ -137,7 +137,7 @@ class Message(UserString.UserString, object):
# look for %(blah) fields in string;
# ignore %% and deal with the
# case where % is first character on the line
keys = re.findall('(?:[^%]|^)%\((\w*)\)[a-z]', full_msg)
keys = re.findall('(?:[^%]|^)?%\((\w*)\)[a-z]', full_msg)
# if we don't find any %(blah) blocks but have a %s
if not keys and re.findall('(?:[^%]|^)%[a-z]', full_msg):