Fix bug in error detection code, where a zero-length string was causing a traceback

Fixes #5064
pull/5083/head
James Cammarata 11 years ago
parent 30948ae0dc
commit 1f80aa768a

@ -403,7 +403,7 @@ Or:
match = True
elif middle.startswith('"') and not middle.endswith('"'):
match = True
if middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ] and probline.count("'") > 2 or probline.count("'") > 2:
if len(middle) > 0 and middle[0] in [ '"', "'" ] and middle[-1] in [ '"', "'" ] and probline.count("'") > 2 or probline.count("'") > 2:
unbalanced = True
if match:
msg = msg + """

Loading…
Cancel
Save