There was an error while loading. Please reload this page.
1 parent 5340c4f commit d3192e5Copy full SHA for d3192e5
1 file changed
bpython/importcompletion.py
@@ -110,7 +110,11 @@ def find_modules(path):
110
# Perhaps a zip file
111
return
112
113
- for name in os.listdir(path):
+ try:
114
+ filenames = os.listdir(path)
115
+ except EnvironmentError:
116
+ filenames = []
117
+ for name in filenames:
118
if not any(name.endswith(suffix[0]) for suffix in imp.get_suffixes()):
119
# Possibly a package
120
if '.' in name:
0 commit comments