diff options
| author | Enrico Granata <egranata@apple.com> | 2012-11-08 02:44:10 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2012-11-08 02:44:10 +0000 |
| commit | 2ffcf43a135a522f966cf03350b65aed6c9a40f3 (patch) | |
| tree | 6fd7f110c1a4d0b0013822052df707a7627d6451 /lldb/source/Interpreter/ScriptInterpreterPython.cpp | |
| parent | 1759848be00a5ab48ba5bccb70945b30c68da7f1 (diff) | |
| download | bcm5719-llvm-2ffcf43a135a522f966cf03350b65aed6c9a40f3.tar.gz bcm5719-llvm-2ffcf43a135a522f966cf03350b65aed6c9a40f3.zip | |
Adding support for loading the scripting resource as part of a framework, lacking the dSYM bundle, or if the bundle has no Pythonic resources whatsoever
Solving an issue where "command script import" would fail to pick the file indicated by the user as a result of something with the same name being in an earlier position in sys.path
llvm-svn: 167570
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp')
| -rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 87c2008e73a..11a64b6f6cd 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -2424,7 +2424,7 @@ ScriptInterpreterPython::LoadScriptingModule (const char* pathname, // now make sure that Python has "directory" in the search path StreamString command_stream; - command_stream.Printf("if not (sys.path.__contains__('%s')):\n sys.path.append('%s');\n\n", + command_stream.Printf("if not (sys.path.__contains__('%s')):\n sys.path.insert(1,'%s');\n\n", directory, directory); bool syspath_retval = ExecuteMultipleLines(command_stream.GetData(), ScriptInterpreter::ExecuteScriptOptions().SetEnableIO(false).SetSetLLDBGlobals(false)); |

