summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 29dd037efd8..97f8388d771 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -1043,9 +1043,9 @@ bool PythonFile::GetUnderlyingFile(File &file) const {
file.Close();
// We don't own the file descriptor returned by this function, make sure the
// File object knows about that.
- file.SetDescriptor(PyObject_AsFileDescriptor(m_py_obj), false);
PythonString py_mode = GetAttributeValue("mode").AsType<PythonString>();
- file.SetOptions(PythonFile::GetOptionsFromMode(py_mode.GetString()));
+ auto options = PythonFile::GetOptionsFromMode(py_mode.GetString());
+ file.SetDescriptor(PyObject_AsFileDescriptor(m_py_obj), options, false);
return file.IsValid();
}
OpenPOWER on IntegriCloud