X Tutup
Skip to content

Commit 33a22a7

Browse files
committed
Catch SyntaxError in import completion.
1 parent 597ef02 commit 33a22a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/importcompletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def find_modules(path):
7777
name = os.path.splitext(name)[0]
7878
try:
7979
fo, pathname, _ = imp.find_module(name, [path])
80-
except ImportError:
80+
except (ImportError, SyntaxError):
8181
continue
8282
else:
8383
if fo is not None:

0 commit comments

Comments
 (0)
X Tutup