Commit 57fa7d3c authored by Stefan Behnel's avatar Stefan Behnel

Use a saner way to check for non-trivial exception patterns. Not everything...

Use a saner way to check for non-trivial exception patterns. Not everything has an entry, but everything in a temp probably has a reason for being there.
parent efff5dd5
...@@ -7168,7 +7168,7 @@ class ExceptClauseNode(Node): ...@@ -7168,7 +7168,7 @@ class ExceptClauseNode(Node):
if self.pattern: if self.pattern:
has_non_literals = not all( has_non_literals = not all(
pattern.is_literal or (pattern.entry and pattern.entry.is_const) pattern.is_literal or pattern.is_simple() and not pattern.is_temp
for pattern in self.pattern) for pattern in self.pattern)
if has_non_literals: if has_non_literals:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment