summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 15843feae57..e7d9443c5fd 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -807,8 +807,10 @@ ScriptInterpreterPythonImpl::GetMaxPositionalArgumentsForCallable(
llvm::inconvertibleErrorCode(),
"can't find callable: %s", callable_name.str().c_str());
}
- PythonCallable::ArgInfo arg_info = pfunc.GetNumArguments();
- return arg_info.max_positional_args;
+ llvm::Expected<PythonCallable::ArgInfo> arg_info = pfunc.GetArgInfo();
+ if (!arg_info)
+ return arg_info.takeError();
+ return arg_info.get().max_positional_args;
}
static std::string GenerateUniqueName(const char *base_name_wanted,
OpenPOWER on IntegriCloud