Mercurial > libervia-backend
diff sat/plugins/plugin_xep_0277.py @ 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 | 02eec2a5b5f9 |
children | 7df12ffa6620 |
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)