Skip to content

Commit 341fa33

Browse files
committed
reset inside_string properly after a SyntaxError
1 parent 11aba22 commit 341fa33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ def showsyntaxerror(self, filename=None):
199199
sys.last_type = type
200200
sys.last_value = value
201201
if filename and type is SyntaxError:
202-
self.inside_string = False
203202
# Work hard to stuff the correct filename in the exception
204203
try:
205204
msg, (dummy_filename, lineno, offset, line) = value
@@ -1499,6 +1498,7 @@ def clear_current_line(self):
14991498
"""This is used as the exception callback for the Interpreter instance.
15001499
It prevents autoindentation from occuring after a traceback."""
15011500

1501+
self.inside_string = False
15021502
self.s = ''
15031503

15041504
def get_key(self):

0 commit comments

Comments
 (0)