Skip to content

Commit 7011ccc

Browse files
committed
Ignore IOError raised by imp.find_module. Fixes #237.
1 parent d69d127 commit 7011ccc

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
@@ -134,7 +134,7 @@ def find_modules(path):
134134
with catch_warnings():
135135
warnings.simplefilter("ignore", ImportWarning)
136136
fo, pathname, _ = imp.find_module(name, [path])
137-
except (ImportError, SyntaxError):
137+
except (ImportError, IOError, SyntaxError):
138138
continue
139139
except UnicodeEncodeError:
140140
# Happens with Python 3 when there is a filename in some

0 commit comments

Comments
 (0)