Open beren12 opened 1 year ago
I'm not sure if it's an error on the pypi-install side or a unit test needs updating
It's a bug in stig:
File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/logger.py", line 57, in init self._handler.setFormatter(handlers[0].formatter) IndexError: list index out of range
stig redirects logging to its TUI console in TUI mode, but it tries to preserve the existing log message formatter. This fails because there is no existing handler to get a formatter from.
If you want to fix this, it should be relatively simple:
try:
self._handler.setFormatter(handlers[0].formatter)
except IndexError:
self._handler.setFormatter(<create formatter from scratch>)
It's probably safe (maybe even preferable) to never use the existing formatter and always create one from scratch. It's been years since I worked on this code, so... I dunno.
If you are not familiar with the logging module: https://docs.python.org/3/library/logging.html
Was trying to make things more simple and package this with an auto-packager on debian but it tells me a unit test is failing. I believe all deps are installed. The error is as follows: