Trivial: log traceback on an unexpected error

Otherwise, it's way too hard to guess what went wrong.

Change-Id: I15ea8182c7699294c654dd3d61c5b7d0b4f4f8e5
This commit is contained in:
Dmitry Tantsur 2024-06-06 18:52:34 +02:00
parent b01bbdf42a
commit 4f92263791
No known key found for this signature in database
GPG Key ID: 315B2AF9FD216C60

View File

@ -30,7 +30,7 @@ def prometheus_metrics():
config.read(os.environ.get('IRONIC_CONFIG'))
DIR = config['oslo_messaging_notifications']['location']
except Exception:
LOG.error('Unexpected error')
LOG.exception('Unexpected error')
abort(500)
all_files = [os.path.join(DIR, name) for name in os.listdir(DIR)