os-api-ref/os_api_ref
Rafael Weingärtner 3d4f056ca3 Fix exception logging
When an exception happens while executing the method `_load_param_file`,
the exception logging `LOG.exception(exc_info=exc)` will generate an
error.

A small snippet to reproduce the issue is the following code:

  from sphinx.util import logging

  LOG = logging.getLogger(__name__)

  try:
      raise Exception("teste")
  except Exception as exc:
      LOG.exception(exc_info=exc)

Which will generate the error:

  Exception: teste

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/rafael/git/os-api-ref/os_api_ref/test-logging.py", line 8, in <module>
      LOG.exception(exc_info=exc)
  TypeError: exception() missing 1 required positional argument: 'msg'

  Process finished with exit code 1

With this fix, the exception logging error is solved, and users get a
meaningful message.

Change-Id: Ib3c3e93c283d86b9708c74e60c2ac5762dc2c222
2021-10-21 10:16:39 +01:00
..
assets detail/close button, bug #1618955 2017-01-18 08:59:06 -05:00
tests Drop support for Sphinx < 4.x 2021-10-21 10:14:22 +01:00
__init__.py Fix exception logging 2021-10-21 10:16:39 +01:00
http_codes.py Remove six 2021-10-21 10:14:26 +01:00