# HG changeset patch # User Pascal Volk # Date 1354978110 0 # Node ID 0bce7e1d1349715da0835c1ea75ba3a071458016 # Parent a6b6b0937cae072136bc16d5cbdbcedafbbb224c VMM/mailbox: Decode error messages from doveadm. Those errors occur only with the dbox mailbox format when the mailbox.folders contains non-ASCII mailbox names. diff -r a6b6b0937cae -r 0bce7e1d1349 VirtualMailManager/mailbox.py --- a/VirtualMailManager/mailbox.py Mon Dec 03 19:19:52 2012 +0000 +++ b/VirtualMailManager/mailbox.py Sat Dec 08 14:48:30 2012 +0000 @@ -14,6 +14,7 @@ from binascii import a2b_base64, b2a_base64 from subprocess import Popen, PIPE +from VirtualMailManager import ENCODING from VirtualMailManager.account import Account from VirtualMailManager.common import lisdir from VirtualMailManager.errors import VMMError @@ -257,7 +258,7 @@ stderr = process.communicate()[1] if process.returncode: e_msg = _('Failed to create mailboxes: %r\n') % mailboxes - raise VMMError(e_msg + stderr.strip().decode(), VMM_ERROR) + raise VMMError(e_msg + stderr.strip().decode(ENCODING), VMM_ERROR) def create(self): """Create a dbox INBOX"""