summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-11-13 15:11:43 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-11-14 11:58:10 +0100
commit072e65ed0eec227855a9274269df685e53b692bf (patch)
treec66fa918727824314748e2c4801909c8b54f53db
parent91f3f3b74fe106893582c87838a9fb25b0721aa6 (diff)
downloadpykolab-072e65ed0eec227855a9274269df685e53b692bf.tar.gz
Allow wildcards to be specified in setting quota through the command-line.
-rw-r--r--pykolab/cli/cmd_set_quota.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/pykolab/cli/cmd_set_quota.py b/pykolab/cli/cmd_set_quota.py
index cbfd529..aa0389f 100644
--- a/pykolab/cli/cmd_set_quota.py
+++ b/pykolab/cli/cmd_set_quota.py
@@ -56,12 +56,9 @@ def execute(*args, **kw):
if not imap.has_folder(folder):
print >> sys.stderr, _("No such folder %r") % (folder)
+ sys.exit(1)
- else:
- imap.set_quota(folder, quota)
-
- # See if the folder is an INBOX folder
- # If yes, edit LDAP (through WAP client)
- # If no, edit IMAP
+ for _folder in imap.lm(folder):
+ imap.set_quota(_folder, quota)
+ print >> sys.stdout, "Quota for folder '%s' set to %d" % (_folder, quota)
- # Verify the folder actually exists in IMAP