[GNC] Another Potential Software Defect
Robert Simmons
rsimmons0 at gmail.com
Wed Aug 10 21:45:47 EDT 2022
The following is, of course, not recommended. Those errors are pretty
difficult to suppress because they're coming from C/C++ stdout. If you want
to hide them, contextlib.suppress and contextlib.redirect_stdout both do
not work. However, there is a python package called wurlitzer that does the
trick.
import wurlitzer
with wurlitzer.pipes() as (out, err):
job = gnucash.gnucash_business.Job(book, '1', cust, 'Build Deathstar')
you can also just do:
with wurlitzer.pipes():
job = gnucash.gnucash_business.Job(book, '1', cust, 'Build Deathstar')
and just drop the error messages on the floor until the underlying software
defect is fixed.
More information about the gnucash-user
mailing list