summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-13 17:05:07 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-30 14:50:55 +0200
commit51a22f50389e429fe8eef84f423e7cdbe1fa6499 (patch)
treeaedaf47d6c43ca148e8f0a8ebde9d2015b294a85
parentaad5fa666715d8e68ea3a110a0e5d6a44a11beb1 (diff)
downloadpykolab-51a22f50389e429fe8eef84f423e7cdbe1fa6499.tar.gz
Correct cmd_delete_mailbox.py
-rw-r--r--pykolab/cli/cmd_delete_mailbox.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pykolab/cli/cmd_delete_mailbox.py b/pykolab/cli/cmd_delete_mailbox.py
index 973cd8b..0978b7e 100644
--- a/pykolab/cli/cmd_delete_mailbox.py
+++ b/pykolab/cli/cmd_delete_mailbox.py
@@ -17,10 +17,13 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+import sys
+
import commands
import pykolab
+from pykolab.imap import IMAP
from pykolab.translate import _
log = pykolab.getLogger('pykolab.cli')
@@ -43,6 +46,8 @@ def execute(*args, **kw):
print >> sys.stderr, _("No mailbox specified")
sys.exit(1)
+ imap = IMAP()
+
imap.connect()
delete_folders = imap.lm(delete_folder)
for delete_folder in delete_folders: