changeset 3548:13e7ef106589

plugin XEP-0277: don't wrap `DataError` in `failure.Failure` in `parseCommentUrl` as it is not catched correctly: `failure.Failure` is subclass of `BaseException` but not of `Exception`, as a result `except Exception` doesn't catch it correctly. This is fixed by not wrapping `DataError` in `failure.Failure` anymore.
author Goffi <goffi@goffi.org>
date Fri, 04 Jun 2021 17:18:44 +0200
parents 1ac5570fa998
children 3fd60beb9b92
files sat/plugins/plugin_xep_0277.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0277.py	Fri Jun 04 15:23:24 2021 +0200
+++ b/sat/plugins/plugin_xep_0277.py	Fri Jun 04 17:18:44 2021 +0200
@@ -1005,7 +1005,7 @@
         node = parsed_queries.get("node", [""])[0]
 
         if not node:
-            raise failure.Failure(exceptions.DataError("Invalid comments link"))
+            raise exceptions.DataError("Invalid comments link")
 
         return (service, node)