comparison babel/messages/checkers.py @ 362:928e3021c552

Convert format strings to str for nicer error messages (no u prefix) in the python_format checker.
author aronacher
date Tue, 17 Jun 2008 22:11:09 +0000
parents 9acf6b5baa22
children 86fb56f7d5c8
comparison
equal deleted inserted replaced
361:1b78b747b386 362:928e3021c552
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 not None:
103 continue 103 continue
104 result.append((name, 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):
108 if a == b: 108 if a == b:
109 return True 109 return True
Copyright (C) 2012-2017 Edgewall Software