]> granicus.if.org Git - python/commitdiff
bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978)
authorPablo Galindo <Pablogsal@gmail.com>
Mon, 16 Oct 2017 08:24:22 +0000 (09:24 +0100)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 16 Oct 2017 08:24:22 +0000 (11:24 +0300)
Lib/xml/etree/ElementPath.py

index c9d6ef345b91126d7a64b45a9b482c1190a4b59a..ef32917b14d41e22a490d658840750d68e9493c7 100644 (file)
@@ -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] == "/":