changeset 3450:66c4fc1f7c30

plugin XEP-0106: log rejected value when escaping fails.
author Goffi <goffi@goffi.org>
date Fri, 11 Dec 2020 17:49:44 +0100
parents 893582c2d983
children f37e6e78db12
files sat/plugins/plugin_xep_0106.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0106.py	Fri Dec 11 17:48:19 2020 +0100
+++ b/sat/plugins/plugin_xep_0106.py	Fri Dec 11 17:49:44 2020 +0100
@@ -87,7 +87,7 @@
         """
         if not escaped or escaped.startswith(r'\27') or escaped.endswith(r'\27'):
             raise ValueError("escaped value must not be empty, or start or end with a "
-                             "whitespace")
+                             f"whitespace: rejected value is {escaped!r}")
         unescaped = []
         idx = 0
         while idx < len(escaped):