Show More
@@ -117,9 +117,7 b' class Stats(object):' | |||||
117 |
|
117 | |||
118 | def label(code): |
|
118 | def label(code): | |
119 | if isinstance(code, str): |
|
119 | if isinstance(code, str): | |
120 | if sys.version_info.major >= 3: |
|
120 | return code.encode('latin-1') | |
121 | code = code.encode('latin-1') |
|
|||
122 | return code |
|
|||
123 | try: |
|
121 | try: | |
124 | mname = _fn2mod[code.co_filename] |
|
122 | mname = _fn2mod[code.co_filename] | |
125 | except KeyError: |
|
123 | except KeyError: | |
@@ -136,7 +134,4 b' def label(code):' | |||||
136 |
|
134 | |||
137 | res = '%s:%d(%s)' % (mname, code.co_firstlineno, code.co_name) |
|
135 | res = '%s:%d(%s)' % (mname, code.co_firstlineno, code.co_name) | |
138 |
|
136 | |||
139 | if sys.version_info.major >= 3: |
|
137 | return res.encode('latin-1') | |
140 | res = res.encode('latin-1') |
|
|||
141 |
|
||||
142 | return res |
|
General Comments 0
You need to be logged in to leave comments.
Login now