only close Mailbox if opened
This commit is contained in:
parent
aaa35f20c2
commit
20309b376b
1 changed files with 3 additions and 5 deletions
|
@ -75,6 +75,9 @@ except (wa.LoginIncorrect, FileNotFoundError) as exp:
|
|||
code = plaintext_lines[plaintext_lines.index('Login Code') + 1]
|
||||
break
|
||||
|
||||
Mailbox.close()
|
||||
Mailbox.logout()
|
||||
|
||||
print('code found:', code)
|
||||
user.login(email_code=code, language='english')
|
||||
|
||||
|
@ -176,8 +179,3 @@ while True:
|
|||
parse_trs(trs)
|
||||
else:
|
||||
break
|
||||
|
||||
# CLOSE
|
||||
|
||||
Mailbox.close()
|
||||
Mailbox.logout()
|
||||
|
|
Loading…
Reference in a new issue