A few Python 2 fixes

This commit is contained in:
Dave Halter
2019-05-18 01:09:09 +02:00
parent cc68942ec1
commit 4176af337f
6 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -234,7 +234,7 @@ def _load_from_typeshed(evaluator, actual_context_set, parent_module_context, im
def _try_to_load_stub_from_file(evaluator, actual_context_set, path, import_names):
try:
stub_module_node = _load_stub(evaluator, path)
except OSError:
except (OSError, IOError): # IOError is Python 2 only
# The file that you're looking for doesn't exist (anymore).
return None
else: