summaryrefslogtreecommitdiff
path: root/scripts/use_lldb_suite.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
commitf3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch)
tree48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /scripts/use_lldb_suite.py
parent2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff)
Notes
Diffstat (limited to 'scripts/use_lldb_suite.py')
-rw-r--r--scripts/use_lldb_suite.py9
1 files changed, 6 insertions, 3 deletions
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()