aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
index e1a3156d10af..2667f73516ba 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
@@ -85,14 +85,15 @@ public:
bool has_class_name = !class_name.empty();
bool has_interpreter_dict =
!(llvm::StringRef(m_interpreter.GetDictionaryName()).empty());
- if (!has_class_name && !has_interpreter_dict && !script_obj) {
- if (!has_class_name)
- return create_error("Missing script class name.");
- else if (!has_interpreter_dict)
- return create_error("Invalid script interpreter dictionary.");
- else
- return create_error("Missing scripting object.");
- }
+
+ if (!has_class_name)
+ return create_error("Missing script class name.");
+
+ if (!has_interpreter_dict)
+ return create_error("Invalid script interpreter dictionary.");
+
+ if (!script_obj)
+ return create_error("Missing scripting object.");
Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
Locker::FreeLock);