From fa2147176639855e54d13b36b1c463f59260eb15 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 11 Dec 2020 17:49:44 +0100 Subject: [PATCH] plugin XEP-0106: log rejected value when escaping fails. --- sat/plugins/plugin_xep_0106.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sat/plugins/plugin_xep_0106.py b/sat/plugins/plugin_xep_0106.py index 4022f8f9..53459355 100644 --- a/sat/plugins/plugin_xep_0106.py +++ b/sat/plugins/plugin_xep_0106.py @@ -87,7 +87,7 @@ class XEP_0106(object): """ 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):