From 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 6 Jan 2016 20:12:03 +0000 Subject: Vendor import of lldb trunk r256945: https://llvm.org/svn/llvm-project/lldb/trunk@256945 --- utils/vim-lldb/python-vim-lldb/plugin.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 utils/vim-lldb/python-vim-lldb/plugin.py (limited to 'utils/vim-lldb/python-vim-lldb/plugin.py') diff --git a/utils/vim-lldb/python-vim-lldb/plugin.py b/utils/vim-lldb/python-vim-lldb/plugin.py new file mode 100644 index 0000000000000..694783a95b0e4 --- /dev/null +++ b/utils/vim-lldb/python-vim-lldb/plugin.py @@ -0,0 +1,14 @@ + +# Try to import all dependencies, catch and handle the error gracefully if it fails. + +import import_lldb + +try: + import lldb + import vim +except ImportError: + sys.stderr.write("Unable to load vim/lldb module. Check lldb is on the path is available (or LLDB is set) and that script is invoked inside Vim with :pyfile") + pass +else: + # Everthing went well, so use import to start the plugin controller + from lldb_controller import * -- cgit v1.2.3