Branch 'pykolab-0.6' - pykolab/cli
Thomas Brüderli
bruederli at kolabsys.com
Thu Feb 5 11:35:28 CET 2015
pykolab/cli/cmd_set_quota.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 93eec46e37c37be27735d8a42e1bf36287594a14
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Thu Feb 5 02:41:22 2015 +0100
Fix printing of quota update status (#4496)
diff --git a/pykolab/cli/cmd_set_quota.py b/pykolab/cli/cmd_set_quota.py
index cbfd529..1d39056 100644
--- a/pykolab/cli/cmd_set_quota.py
+++ b/pykolab/cli/cmd_set_quota.py
@@ -17,6 +17,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+import sys
+
import commands
import pykolab
@@ -54,14 +56,16 @@ def execute(*args, **kw):
imap = IMAP()
imap.connect(domain=domain)
+ # Verify the folder actually exists in IMAP
if not imap.has_folder(folder):
print >> sys.stderr, _("No such folder %r") % (folder)
-
- else:
- imap.set_quota(folder, quota)
+ sys.exit(1)
# See if the folder is an INBOX folder
# If yes, edit LDAP (through WAP client)
# If no, edit IMAP
- # Verify the folder actually exists in IMAP
+ for _folder in imap.lm(imap.folder_utf7(folder)):
+ imap.set_quota(_folder, quota)
+ print >> sys.stdout, "Quota for folder '%s' set to %d" % (_folder, int(quota))
+
More information about the commits
mailing list