diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-16 21:04:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-16 21:04:22 +0000 |
commit | 4befb1f96d641a958548654b2c3b674f0ce8404c (patch) | |
tree | 664480204c546e55b123766a30e6fcf022c5486e /scripts | |
parent | f1d04915a666728c241bedb36bd99aafee3ea444 (diff) |
Notes
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lldb.swig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/lldb.swig b/scripts/lldb.swig index 8f1b59c32d4db..8345a4b95038a 100644 --- a/scripts/lldb.swig +++ b/scripts/lldb.swig @@ -40,7 +40,13 @@ us to override the module import logic to suit our needs. This does that. Older swig versions will simply ignore this setting. */ %define MODULEIMPORT -"from . import $module" +"try: + # Try a relative import first + from . import $module +except ImportError: + # Maybe absolute import will work (if we're being loaded from lldb, it + # should). + import $module" %enddef // These versions will not generate working python modules, so error out early. #if SWIG_VERSION >= 0x030009 && SWIG_VERSION < 0x030011 |