Skip to content

Commit

Permalink
[gnucash-commands.cpp] better python_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Oct 28, 2023
1 parent 9900b3b commit 9aaf9e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gnucash/gnucash-commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9aaf9e7

Please sign in to comment.