summaryrefslogtreecommitdiffstats
path: root/pykolab/cli
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/cli')
-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)