Skip to content

Commit 5950e45

Browse files
committed
tests: adjust error handling
Don't use 'finally' for code that shouldn't run if both normal and fallback methods failed. Simply move it outside of the 'try' block.
1 parent ab89d86 commit 5950e45

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/test_thunderbird.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,7 @@ def receive_message(tb, signed=False, encrypted=False, attachment=None):
483483
# alternative way of opening 'message security'
484484
keyCombo('<Control><Alt>s')
485485
message_security = tb.app.child('Message Security - OpenPGP')
486-
finally:
487-
message_security = message_security.parent.parent
486+
message_security = message_security.parent.parent
488487
try:
489488
if signed:
490489
message_security.child('Good Digital Signature')

0 commit comments

Comments
 (0)