summaryrefslogtreecommitdiffstats
path: root/pykolab/cli/cmd_list_mailbox_metadata.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/cli/cmd_list_mailbox_metadata.py')
-rw-r--r--pykolab/cli/cmd_list_mailbox_metadata.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/pykolab/cli/cmd_list_mailbox_metadata.py b/pykolab/cli/cmd_list_mailbox_metadata.py
index ac98283..e77caea 100644
--- a/pykolab/cli/cmd_list_mailbox_metadata.py
+++ b/pykolab/cli/cmd_list_mailbox_metadata.py
@@ -87,8 +87,9 @@ def execute(*args, **kw):
metadata = imap.get_metadata(folder)
- for annotation in metadata[folder].keys():
- print " %-49s %s" % (
- annotation,
- metadata[folder][annotation]
- )
+ if metadata.has_key(folder):
+ for annotation in metadata[folder].keys():
+ print " %-49s %s" % (
+ annotation,
+ metadata[folder][annotation]
+ )