Skip to content

Commit a3401e9

Browse files
reorder the if checks
1 parent 15290d5 commit a3401e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/pdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,9 @@ def default(self, line):
891891
except Exception as e:
892892
# Maybe it's an await expression/statement
893893
if (
894-
isinstance(e, SyntaxError)
894+
self.async_shim_frame is not None
895+
and isinstance(e, SyntaxError)
895896
and e.msg == "'await' outside function"
896-
and self.async_shim_frame is not None
897897
):
898898
try:
899899
self._exec_await(buffer, globals, locals)

0 commit comments

Comments
 (0)