Changeset 323
- Timestamp:
- 12/28/08 15:41:41 (4 years ago)
- Location:
- pyyaml/trunk
- Files:
-
- 2 edited
-
lib/yaml/reader.py (modified) (2 diffs)
-
tests/data/invalid-utf8-byte.loader-error (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/lib/yaml/reader.py
r222 r323 75 75 return "unacceptable character #x%04x: %s\n" \ 76 76 " in \"%s\", position %d" \ 77 % ( ord(self.character), self.reason,77 % (self.character, self.reason, 78 78 self.name, self.position) 79 79 … … 176 176 character = match.group() 177 177 position = self.index+(len(self.buffer)-self.pointer)+match.start() 178 raise ReaderError(self.name, position, character,178 raise ReaderError(self.name, position, ord(character), 179 179 'unicode', "special characters are not allowed") 180 180 -
pyyaml/trunk/tests/data/invalid-utf8-byte.loader-error
r140 r323 1 ------------------------------------------------------------------------------------------------------------------------------- 2 ------------------------------------------------------------------------------------------------------------------------------- 3 ------------------------------------------------------------------------------------------------------------------------------- 4 ------------------------------------------------------------------------------------------------------------------------------- 5 ------------------------------------------------------------------------------------------------------------------------------- 6 ------------------------------------------------------------------------------------------------------------------------------- 7 ------------------------------------------------------------------------------------------------------------------------------- 8 ------------------------------------------------------------------------------------------------------------------------------- 9 ------------------------------------------------------------------------------------------------------------------------------- 10 ------------------------------------------------------------------------------------------------------------------------------- 11 ------------------------------------------------------------------------------------------------------------------------------- 12 ------------------------------------------------------------------------------------------------------------------------------- 13 ------------------------------------------------------------------------------------------------------------------------------- 14 ------------------------------------------------------------------------------------------------------------------------------- 15 ------------------------------------------------------------------------------------------------------------------------------- 16 ------------------------------------------------------------------------------------------------------------------------------- 1 *************************************************************** 2 *************************************************************** 3 *************************************************************** 4 *************************************************************** 5 *************************************************************** 6 *************************************************************** 7 *************************************************************** 8 *************************************************************** 9 *************************************************************** 10 *************************************************************** 11 *************************************************************** 12 *************************************************************** 13 *************************************************************** 14 *************************************************************** 15 *************************************************************** 16 *************************************************************** 17 17 Invalid byte ('\xFF'): ÿ <-- 18 ------------------------------------------------------------------------------------------------------------------------------- 18 ***************************************************************
Note: See TracChangeset
for help on using the changeset viewer.
