diff --git a/gnucash/gnucash-commands.cpp b/gnucash/gnucash-commands.cpp index d0849092726..83c4de4457f 100644 --- a/gnucash/gnucash-commands.cpp +++ b/gnucash/gnucash-commands.cpp @@ -586,10 +586,10 @@ python_cleanup (PyConfig& config, PyStatus& status) gnc_clear_current_session (); PyConfig_Clear(&config); - if (PyStatus_IsExit(status)) - gnc_shutdown_cli (status.exitcode); - - gnc_shutdown_cli (0); + if (status.err_msg && *status.err_msg) + std::cerr << bl::format (_("Python Config failed with error {1}")) % status.err_msg + << std::endl; + gnc_shutdown_cli (status.exitcode); } static void