##// END OF EJS Templates
Check for string_types instead of str
Thomas Kluyver -
Show More
@@ -1198,7 +1198,8 b' class SyntaxTB(ListTB):'
1198 # If the source file has been edited, the line in the syntax error can
1198 # If the source file has been edited, the line in the syntax error can
1199 # be wrong (retrieved from an outdated cache). This replaces it with
1199 # be wrong (retrieved from an outdated cache). This replaces it with
1200 # the current value.
1200 # the current value.
1201 if isinstance(value.filename, str) and isinstance(value.lineno, int):
1201 if isinstance(value.filename, py3compat.string_types) \
1202 and isinstance(value.lineno, int):
1202 linecache.checkcache(value.filename)
1203 linecache.checkcache(value.filename)
1203 newtext = ulinecache.getline(value.filename, value.lineno)
1204 newtext = ulinecache.getline(value.filename, value.lineno)
1204 if newtext:
1205 if newtext:
General Comments 0
You need to be logged in to leave comments. Login now