From: Pablo Galindo Date: Mon, 16 Oct 2017 08:24:22 +0000 (+0100) Subject: bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978) X-Git-Tag: v3.7.0a2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0df19055c92a0b0728659807978e4ca4d6c8e1bc;p=python bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978) --- 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] == "/":