summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorTimotheus Pokorra (TBits.net) <tp@tbits.net>2013-10-16 12:00:03 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-16 12:00:03 +0200
commit54985158fb5d945801445cf1651758b8e3ff9636 (patch)
treeac93858562ade89d63cf9316377c649db325d1e5 /pykolab
parent05f6bf8d7ef033b70f9f9eb7fbccaba107b327e2 (diff)
downloadpykolab-54985158fb5d945801445cf1651758b8e3ff9636.tar.gz
Fix set-mailbox-metadata to handle folders with UTF-8 characters (#2297)
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/cli/cmd_set_mailbox_metadata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pykolab/cli/cmd_set_mailbox_metadata.py b/pykolab/cli/cmd_set_mailbox_metadata.py
index acff7c5..d58ee31 100644
--- a/pykolab/cli/cmd_set_mailbox_metadata.py
+++ b/pykolab/cli/cmd_set_mailbox_metadata.py
@@ -25,6 +25,7 @@ import pykolab
from pykolab.imap import IMAP
from pykolab.translate import _
+from pykolab import imap_utf7
from pykolab import utils
log = pykolab.getLogger('pykolab.cli')
@@ -93,6 +94,6 @@ def execute(*args, **kw):
print >> sys.stderr, _("No such folder %r") % (folder)
else:
- folders = imap.lm(folder)
+ folders = imap.lm(imap_utf7.encode(folder))
for folder in folders:
- imap.set_metadata(folder, metadata_path, metadata_value)
+ imap.set_metadata(imap_utf7.decode(folder), metadata_path, metadata_value)