Project

General

Profile

« Previous | Next » 

Revision 4492

Replaced repr() with strings.urepr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors

View differences:

xpath.py
4 4
import warnings
5 5

  
6 6
from Parser import Parser
7
import strings
7 8
import util
8 9
import xml_dom
9 10

  
......
28 29
        if self.name == '': str_ += '""'
29 30
        else: str_ += self.name
30 31
        if self.is_lookup_only: str_ += '?'
31
        if self.keys != []: str_ += repr(self.keys)
32
        if self.attrs != []: str_ += ':'+repr(self.attrs)
32
        if self.keys != []: str_ += strings.urepr(self.keys)
33
        if self.attrs != []: str_ += ':'+strings.urepr(self.attrs)
33 34
        if self.is_ptr: str_ += '->'
34
        if self.other_branches != []: str_ += '{'+repr(self.other_branches)+'}'
35
        if self.value != None: str_ += '='+repr(self.value)
35
        if self.other_branches != []:
36
            str_ += '{'+strings.urepr(self.other_branches)+'}'
37
        if self.value != None: str_ += '='+strings.urepr(self.value)
36 38
        return str_
37 39
    
38 40
    def __eq__(self, other): return self.__dict__ == other.__dict__

Also available in: Unified diff