From 0df19055c92a0b0728659807978e4ca4d6c8e1bc Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 16 Oct 2017 09:24:22 +0100 Subject: [PATCH] bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978) --- Lib/xml/etree/ElementPath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/xml/etree/ElementPath.py b/Lib/xml/etree/ElementPath.py index c9d6ef345b..ef32917b14 100644 --- a/Lib/xml/etree/ElementPath.py +++ b/Lib/xml/etree/ElementPath.py @@ -285,7 +285,7 @@ def iterfind(elem, path, namespaces=None): try: selector.append(ops[token[0]](next, token)) except StopIteration: - raise SyntaxError("invalid path") + raise SyntaxError("invalid path") from None try: token = next() if token[0] == "/": -- 2.40.0