comparison babel/messages/checkers.py @ 361:8dd1234e8eab trunk

Fixed logic error in the python format checker.
author aronacher
date Wed, 18 Jun 2008 10:42:07 +0000
parents 6cc92793c047
children 8c9dc94062c0
comparison
equal deleted inserted replaced
360:6cc92793c047 361:8dd1234e8eab
97 97
98 def _parse(string): 98 def _parse(string):
99 result = [] 99 result = []
100 for match in PYTHON_FORMAT.finditer(string): 100 for match in PYTHON_FORMAT.finditer(string):
101 name, format, typechar = match.groups() 101 name, format, typechar = match.groups()
102 if typechar == '%' and name is not None: 102 if typechar == '%' and name is None:
103 continue 103 continue
104 result.append((name, str(typechar))) 104 result.append((name, str(typechar)))
105 return result 105 return result
106 106
107 def _compatible(a, b): 107 def _compatible(a, b):
Copyright (C) 2012-2017 Edgewall Software