From 2799aa27005abb370b5ff8a893fd96f396778b2f Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 27 Feb 2025 10:20:39 +0100 Subject: [PATCH] App: Simplify and fix code for ifcopenshell version check --- src/App/Application.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index fe2b62ebf2..b658d196b9 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -3702,24 +3702,23 @@ void Application::getVerboseCommonInfo(QTextStream& str, const std::map(version); + str << "IfcOpenShell " << ver_str.c_str() << ", "; } - Py_DECREF(ifcopenshellVer); + else { + Base::Console().log("Module 'ifcopenshell' not found (safe to ignore, unless using " + "the BIM workbench and IFC).\n"); + } + } + catch (const Py::Exception&) { + Base::PyGILStateLocker lock; + Base::PyException e; + Base::Console().log("%s\n", e.what()); } #if defined(HAVE_OCC_VERSION)