From 15e95d9b3cc7ce8cbe8de22ef80e8230f22107ee Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Tue, 17 Apr 2018 10:31:55 +0100 Subject: [PATCH] Correct the string formatting in a info log message It should be "%s," not just "%,". The error observed was something like... ValueError: unsupported format character ',' (0x2c) at index 91 Closes-Bug: #1764696 Change-Id: I601c8640cec857746c2c17f94116da890f4d65e0 --- mistral/db/v2/sqlalchemy/api.py | 2 +- .../notes/fix-regression-when-logging-58faa35f02cefb34.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-regression-when-logging-58faa35f02cefb34.yaml diff --git a/mistral/db/v2/sqlalchemy/api.py b/mistral/db/v2/sqlalchemy/api.py index 78201396b..5d39579d3 100644 --- a/mistral/db/v2/sqlalchemy/api.py +++ b/mistral/db/v2/sqlalchemy/api.py @@ -180,7 +180,7 @@ def update_on_match(id, specimen, values, session=None): except oslo_sqlalchemy.update_match.NoRowsMatched: LOG.info( "Can't change state of persistent object " - "because it has already been changed. [model_class=%, id=%s, " + "because it has already been changed. [model_class=%s, id=%s, " "specimen=%s, values=%s]", model_class, id, specimen, values ) diff --git a/releasenotes/notes/fix-regression-when-logging-58faa35f02cefb34.yaml b/releasenotes/notes/fix-regression-when-logging-58faa35f02cefb34.yaml new file mode 100644 index 000000000..c9d48ab96 --- /dev/null +++ b/releasenotes/notes/fix-regression-when-logging-58faa35f02cefb34.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + A regression was introduced that caused an error when logging a specific + message. The string formatting was broken, which caused the logging to + fail.