From 99ba12c0121eaeedca3f42be52c87f23605c6771 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 27 Jan 2016 06:09:20 -0500 Subject: Simplify a condition --- coverage/parser.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index 2d0bceba..1a2ff5f8 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: -- cgit v1.2.1