Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_create_mailbox.py
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | my_option_group.add_option( | ||||
) | ) | ||||
def description(): | def description(): | ||||
return """Create a mailbox or sub-folder of an existing mailbox.""" | return """Create a mailbox or sub-folder of an existing mailbox.""" | ||||
def execute(*args, **kw): | def execute(*args, **kw): | ||||
try: | try: | ||||
mailbox = conf.cli_args.pop(0) | mailbox = conf.cli_args.pop(0) | ||||
except IndexError, errmsg: | except IndexError: | ||||
log.error(_("Invalid argument")) | log.error(_("Invalid argument")) | ||||
sys.exit(1) | sys.exit(1) | ||||
if not conf.metadata == None: | if not conf.metadata == None: | ||||
if len(conf.metadata.split('=')) == 2: | if len(conf.metadata.split('=')) == 2: | ||||
annotation = conf.metadata.split('=')[0] | annotation = conf.metadata.split('=')[0] | ||||
annotation_value = conf.metadata.split('=')[1] | annotation_value = conf.metadata.split('=')[1] | ||||
else: | else: | ||||
Show All 11 Lines |