VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 536 c340ba4bd544
parent 533 2676dbf43e1c
child 539 5806fb74130b
equal deleted inserted replaced
535:e956ddc868c0 536:c340ba4bd544
   591 def user_name(ctx):
   591 def user_name(ctx):
   592     """set or update the real name for an address"""
   592     """set or update the real name for an address"""
   593     if ctx.argc < 3:
   593     if ctx.argc < 3:
   594         usage(EX_MISSING_ARGS, _(u"Missing e-mail address and user's name."),
   594         usage(EX_MISSING_ARGS, _(u"Missing e-mail address and user's name."),
   595               ctx.scmd)
   595               ctx.scmd)
   596     if ctx.argc < 4:
   596     elif ctx.argc < 4:
   597         usage(EX_MISSING_ARGS, _(u"Missing user's name."), ctx.scmd)
   597         name = None
   598     ctx.hdlr.user_name(ctx.args[2].lower(), ctx.args[3])
   598     else:
       
   599         name = ctx.args[3]
       
   600     ctx.hdlr.user_name(ctx.args[2].lower(), name)
   599 
   601 
   600 
   602 
   601 def user_password(ctx):
   603 def user_password(ctx):
   602     """update the password for the given address"""
   604     """update the password for the given address"""
   603     if ctx.argc < 3:
   605     if ctx.argc < 3: