Skip to content

Commit 465097b

Browse files
Update run.py
1 parent 695a90e commit 465097b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/idlelib/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def print_exc(typ, exc, tb):
272272
cleanup_traceback(tbe, exclude)
273273
traceback.print_list(tbe, file=efile)
274274
if ((not isinstance(exc, NameError) and not isinstance(exc, AttributeError))
275-
or "\n" in str(exc)):
275+
or "\n" not in str(exc)):
276276
lines = get_message_lines(typ, exc, tb)
277277
else: # User-created Name/AttributeError with multiline message, GH-135511.
278278
lines = [f"{typ.__name__}: {str(exc)}"]

0 commit comments

Comments
 (0)