VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 361 971577b89d26
parent 345 f8d5c8bb8bce
child 362 c2e8eab2616d
equal deleted inserted replaced
360:44283818f8db 361:971577b89d26
   378         usage(EX_MISSING_ARGS, _(u'Missing e-mail address.'), ctx.scmd)
   378         usage(EX_MISSING_ARGS, _(u'Missing e-mail address.'), ctx.scmd)
   379     elif ctx.argc < 4:
   379     elif ctx.argc < 4:
   380         password = None
   380         password = None
   381     else:
   381     else:
   382         password = ctx.args[3]
   382         password = ctx.args[3]
   383     ctx.hdlr.user_add(ctx.args[2].lower(), password)
   383     gen_pass = ctx.hdlr.user_add(ctx.args[2].lower(), password)
       
   384     if gen_pass:
       
   385         w_std(_(u"Generated password: %s") % gen_pass)
   384 
   386 
   385 
   387 
   386 def user_delete(ctx):
   388 def user_delete(ctx):
   387     """delete the specified user"""
   389     """delete the specified user"""
   388     if ctx.argc < 3:
   390     if ctx.argc < 3: