Changeset 323


Ignore:
Timestamp:
12/28/08 15:41:41 (6 years ago)
Author:
xi
Message:

Fixed an issue with ReaderError? generated by the LibYAML wrapper.

Location:
pyyaml/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/reader.py

    r222 r323  
    7575            return "unacceptable character #x%04x: %s\n"    \ 
    7676                    "  in \"%s\", position %d"    \ 
    77                     % (ord(self.character), self.reason, 
     77                    % (self.character, self.reason, 
    7878                            self.name, self.position) 
    7979 
     
    176176            character = match.group() 
    177177            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), 
    179179                    'unicode', "special characters are not allowed") 
    180180 
  • 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*************************************************************** 
    1717Invalid byte ('\xFF'): ÿ <-- 
    18 ------------------------------------------------------------------------------------------------------------------------------- 
     18*************************************************************** 
Note: See TracChangeset for help on using the changeset viewer.