diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index 00342e1..4cb15ab 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -459,8 +459,9 @@ class SyncableAccount(Account): p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) - r = p.communicate() - self.ui.callhook("Hook stdout: %s\nHook stderr:%s\n" % r) + stdout, stderr = p.communicate() + self.ui.callhook("Hook stdout: %s\nHook stderr:%s\n" + % (stdout.decode('utf-8'), stderr.decode('utf-8'))) self.ui.callhook("Hook return code: %d" % p.returncode) except (KeyboardInterrupt, SystemExit): raise