summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-19 10:05:24 -0500
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-19 10:05:24 -0500
commitb70dafa058433b36a336e22897853f4dce9382d2 (patch)
treef466cc0b0a69773b9850aafc16cebab55c19315e /pykolab
parente3b4839c0a0e11f5955d548d630bef0d51846ebd (diff)
downloadpykolab-b70dafa058433b36a336e22897853f4dce9382d2.tar.gz
By popular demand, add a command to subscribe a user to a folder(-pattern)
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/cli/cmd_add_user_subscription.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/pykolab/cli/cmd_add_user_subscription.py b/pykolab/cli/cmd_add_user_subscription.py
index 38dc2d7..4b3393a 100644
--- a/pykolab/cli/cmd_add_user_subscription.py
+++ b/pykolab/cli/cmd_add_user_subscription.py
@@ -74,23 +74,7 @@ def execute(*args, **kw):
sys.exit(1)
_folders = imap.lm(folder_pattern)
- _subscribed_folders = imap.lsub(folder_pattern)
- subscribed_folders = []
for _folder in _folders:
- if not _folder in _subscribed_folders:
- imap.subscribe(_folder)
- subscribed_folders.append(_folder)
+ imap.subscribe(_folder)
- if len(subscribed_folders) > 0:
- print _("Successfully subscribed user %s to the following folders:") % (
- user
- )
-
- print "\n".join(subscribed_folders)
- else:
- print >> sys.stderr, _("User %s not subscribed to any folders.") % (
- user
- )
-
- sys.exit(1) \ No newline at end of file