diff options
Diffstat (limited to 'Lib/codeop.py')
| -rw-r--r-- | Lib/codeop.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/codeop.py b/Lib/codeop.py index 91146be..6ad60e7 100644 --- a/Lib/codeop.py +++ b/Lib/codeop.py @@ -65,9 +65,10 @@ def _maybe_compile(compiler, source, filename, symbol): try: compiler(source + "\n", filename, symbol) return None + except IncompleteInputError as e: + return None except SyntaxError as e: - if "incomplete input" in str(e): - return None + pass # fallthrough return compiler(source, filename, symbol, incomplete_input=False) |
