Skip to content

Commit e9daabf

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 f8b79b8 commit e9daabf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_thunderbird.py

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

0 commit comments

Comments
 (0)