From 9bb3b0e046de318d7fcbeecd0fd786a3101bffc6 Mon Sep 17 00:00:00 2001 From: mwganson Date: Wed, 29 Jul 2020 01:38:20 -0500 Subject: [PATCH] [CheckGeometry] fix python2 build --- src/Base/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index 7e8b9f1cfc..3df6ad566c 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -326,7 +326,7 @@ std::string InterpreterSingleton::runStringWithKey(const char *psCmd, const char #if PY_MAJOR_VERSION >= 3 PyObject* str = PyUnicode_AsEncodedString(key_return_value, "utf-8", "~E~"); #else - PyObject* str = PyString_FromString(key_return_value); + PyObject* str = PyObject_Str(key_return_value); #endif const char* result = PyBytes_AS_STRING(str); return result;