summaryrefslogtreecommitdiff
path: root/coverage/parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-01-27 06:09:20 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-01-27 06:09:20 -0500
commit09184a99a25fa8fa267a2ac1320abb71fcad5079 (patch)
tree54be80f67e7836b3ecb62fd68263ac834d0300ca /coverage/parser.py
parentca98a4df212af35c07fa17e5b076a68e58b6b24f (diff)
downloadpython-coveragepy-09184a99a25fa8fa267a2ac1320abb71fcad5079.tar.gz
Simplify a condition
Diffstat (limited to 'coverage/parser.py')
-rw-r--r--coverage/parser.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index 2d0bceb..1a2ff5f 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -653,12 +653,11 @@ class AstArcAnalyzer(object):
try_block.raise_from | # or a `raise`,
try_block.return_from # or a `return`.
)
- if node.handlers:
- if last_handler_start is not None:
- # If we had handlers, and we didn't have a bare `except:`
- # handler, then the last handler jumps to the `finally` for the
- # unhandled exceptions.
- final_from.add(last_handler_start)
+ if last_handler_start is not None:
+ # If we had handlers, and we didn't have a bare `except:`
+ # handler, then the last handler jumps to the `finally` for the
+ # unhandled exceptions.
+ final_from.add(last_handler_start)
exits = self.add_body_arcs(node.finalbody, prev_lines=final_from)
if try_block.break_from: