Skip to content

Commit

Permalink
Merge branch 'pycryptodome'
Browse files Browse the repository at this point in the history
  • Loading branch information
j4321 committed Sep 27, 2018
2 parents 197f2de + 604aa05 commit 060e593
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion checkmailslib/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ def encrypt(mailbox, pwd, server, login, password, folder):
info = [server, login, password, folder]
with open(os.path.join(LOCAL_PATH, mailbox), 'wb') as fich:
fich.write(iv)
fich.write(cipher.encrypt("\n".join(info)))
try:
fich.write(cipher.encrypt("\n".join(info)))
except TypeError:
fich.write(cipher.encrypt("\n".join(info).encode()))


# --- Images
Expand Down
5 changes: 3 additions & 2 deletions checkmailslib/trayicon/tkicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
It follows http://www.freedesktop.org specifications when looking up the
system tray manager.
"""

import tkinter
from checkmailslib.constants import PhotoImage

Expand Down Expand Up @@ -169,7 +169,8 @@ def change_icon(self, icon, desc):

def loop(self, tk_window):
# no need to update since it is part of the tk mainloop
tk_window.loop_id = ""
self.update_idletasks()
tk_window.loop_id = tk_window.after(10, self.loop, tk_window)

def get_item_label(self, item):
return self.menu.entrycget(item, 'label')
Expand Down

0 comments on commit 060e593

Please sign in to comment.