summaryrefslogtreecommitdiffstats
path: root/pykolab/cli/cmd_delete_mailbox.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-16 12:28:37 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-16 12:29:47 +0200
commitdabfc90867c47a99ae57bcba12073e2a4dbc244f (patch)
treea82b5d1f132503d2678cd6618c0b2e57399d8b44 /pykolab/cli/cmd_delete_mailbox.py
parent54985158fb5d945801445cf1651758b8e3ff9636 (diff)
downloadpykolab-dabfc90867c47a99ae57bcba12073e2a4dbc244f.tar.gz
Escape the necessary spaces in verifying the folder to delete (#2298)
Diffstat (limited to 'pykolab/cli/cmd_delete_mailbox.py')
-rw-r--r--pykolab/cli/cmd_delete_mailbox.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pykolab/cli/cmd_delete_mailbox.py b/pykolab/cli/cmd_delete_mailbox.py
index 61bc278..0ef83fb 100644
--- a/pykolab/cli/cmd_delete_mailbox.py
+++ b/pykolab/cli/cmd_delete_mailbox.py
@@ -52,6 +52,10 @@ def execute(*args, **kw):
delete_folders = imap.list_folders(delete_folder)
+ if len(delete_folders) == 0:
+ print >> sys.stderr, _("No such folder(s)")
+ sys.exit(1)
+
for delete_folder in delete_folders:
imap.delete_mailfolder(delete_folder)