From f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:50:09 +0000 Subject: Vendor import of lldb release_39 branch r276489: https://llvm.org/svn/llvm-project/lldb/branches/release_39@276489 --- scripts/use_lldb_suite.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/use_lldb_suite.py') diff --git a/scripts/use_lldb_suite.py b/scripts/use_lldb_suite.py index 63a098cea220..f3e358af143b 100644 --- a/scripts/use_lldb_suite.py +++ b/scripts/use_lldb_suite.py @@ -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() -- cgit v1.2.3