Kaydet (Commit) aa6f688b authored tarafından Benjamin Peterson's avatar Benjamin Peterson

only close non-None files

üst feb51492
...@@ -241,6 +241,7 @@ class ImportTests(unittest.TestCase): ...@@ -241,6 +241,7 @@ class ImportTests(unittest.TestCase):
# Issue #15902 # Issue #15902
name = '_heapq' name = '_heapq'
found = imp.find_module(name) found = imp.find_module(name)
if found[0] is not None:
found[0].close() found[0].close()
if found[2][2] != imp.C_EXTENSION: if found[2][2] != imp.C_EXTENSION:
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment