summaryrefslogtreecommitdiffstats
path: root/pykolab/cli
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-05 20:22:33 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-05 20:25:16 +0100
commitb6e86aca4378144c38424f2f796913fd4ac2172c (patch)
treef480d275e8caa184213e41ad78f98ba35d20663b /pykolab/cli
parenta8d64317834c4efc56d41b314d0a219e5de7ecfd (diff)
downloadpykolab-b6e86aca4378144c38424f2f796913fd4ac2172c.tar.gz
Fix the utf7 backend versus preferred utf8 display
Diffstat (limited to 'pykolab/cli')
-rw-r--r--pykolab/cli/cmd_delete_mailbox.py2
-rw-r--r--pykolab/cli/cmd_list_mailbox_acls.py2
-rw-r--r--pykolab/cli/cmd_list_mailbox_metadata.py2
-rw-r--r--pykolab/cli/cmd_list_quota.py12
-rw-r--r--pykolab/cli/cmd_set_mailbox_acl.py2
5 files changed, 13 insertions, 7 deletions
diff --git a/pykolab/cli/cmd_delete_mailbox.py b/pykolab/cli/cmd_delete_mailbox.py
index 68e1735..61bc278 100644
--- a/pykolab/cli/cmd_delete_mailbox.py
+++ b/pykolab/cli/cmd_delete_mailbox.py
@@ -53,5 +53,5 @@ def execute(*args, **kw):
delete_folders = imap.list_folders(delete_folder)
for delete_folder in delete_folders:
- imap.delete_mailfolder(imap.folder_utf8(delete_folder))
+ imap.delete_mailfolder(delete_folder)
diff --git a/pykolab/cli/cmd_list_mailbox_acls.py b/pykolab/cli/cmd_list_mailbox_acls.py
index ae04a04..f69c09d 100644
--- a/pykolab/cli/cmd_list_mailbox_acls.py
+++ b/pykolab/cli/cmd_list_mailbox_acls.py
@@ -55,7 +55,7 @@ def execute(*args, **kw):
else:
acls = []
- folders = imap.lm(folder)
+ folders = imap.list_folders(folder)
for folder in folders:
print "Folder", folder
acls = imap.list_acls(folder)
diff --git a/pykolab/cli/cmd_list_mailbox_metadata.py b/pykolab/cli/cmd_list_mailbox_metadata.py
index d54346d..a07420d 100644
--- a/pykolab/cli/cmd_list_mailbox_metadata.py
+++ b/pykolab/cli/cmd_list_mailbox_metadata.py
@@ -81,7 +81,7 @@ def execute(*args, **kw):
else:
metadata = []
- folders = imap.lm(folder)
+ folders = imap.list_folders(folder)
for folder in folders:
print "Folder", folder
diff --git a/pykolab/cli/cmd_list_quota.py b/pykolab/cli/cmd_list_quota.py
index 0bb4789..4d3221f 100644
--- a/pykolab/cli/cmd_list_quota.py
+++ b/pykolab/cli/cmd_list_quota.py
@@ -50,7 +50,7 @@ def execute(*args, **kw):
folders = []
- quota_folders = imap.lm(quota_folder)
+ quota_folders = imap.list_folders(quota_folder)
for quota_folder in quota_folders:
try:
(used, quota) = imap.get_quota(quota_folder)
@@ -63,7 +63,10 @@ def execute(*args, **kw):
percentage = round(((float)(used)/(float)(quota)) * 100.0, 1)
print "%d (Used: %d, Percentage: %d)" % (quota, used, percentage)
else:
- print "No quota"
+ if used == None:
+ print "%d (Used: %d, Percentage: %d)" % (quota, 0, 0)
+ else:
+ print "No quota"
except:
try:
(quota_root, used, quota) = imap.get_quota_root(quota_folder)
@@ -76,7 +79,10 @@ def execute(*args, **kw):
percentage = round(((float)(used)/(float)(quota)) * 100.0, 1)
print "%d (Root: %s, Used: %d, Percentage: %d)" % (quota, quota_root, used, percentage)
else:
- print "No quota"
+ if used == None and not quota_root == None:
+ print "%d (Root: %s, Used: %d, Percentage: %d)" % (quota, quota_root, 0, 0)
+ else:
+ print "No quota"
except:
print "Folder: %s" % (quota_folder)
print "No quota root"
diff --git a/pykolab/cli/cmd_set_mailbox_acl.py b/pykolab/cli/cmd_set_mailbox_acl.py
index 85e52b8..e86c62d 100644
--- a/pykolab/cli/cmd_set_mailbox_acl.py
+++ b/pykolab/cli/cmd_set_mailbox_acl.py
@@ -67,6 +67,6 @@ def execute(*args, **kw):
print >> sys.stderr, _("No such folder %r") % (folder)
else:
- folders = imap.lm(folder)
+ folders = imap.list_folders(folder)
for folder in folders:
imap.set_acl(folder, identifier, acl)