mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Fix ResourceWarning about unclosed file in use_lldb_suite_root.py.
llvm-svn: 257945
This commit is contained in:
@@ -17,6 +17,9 @@ def find_lldb_root():
|
||||
lldb_root = find_lldb_root()
|
||||
if lldb_root is not None:
|
||||
import imp
|
||||
module = imp.find_module("use_lldb_suite_root", [lldb_root])
|
||||
if module is not None:
|
||||
imp.load_module("use_lldb_suite_root", *module)
|
||||
fp, pathname, desc = imp.find_module("use_lldb_suite_root", [lldb_root])
|
||||
try:
|
||||
imp.load_module("use_lldb_suite_root", fp, pathname, desc)
|
||||
finally:
|
||||
if fp:
|
||||
fp.close()
|
||||
|
||||
Reference in New Issue
Block a user