VMM/cli/subcommands: Small improvement in domain_add(). v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Sat, 05 Nov 2011 16:41:19 +0000
branchv0.6.x
changeset 456 7847f949d0a2
parent 455 b15960e9c53c
child 457 2019aa415dcd
VMM/cli/subcommands: Small improvement in domain_add(). Inform the admin, when the postmaster account will be auto-created.
VirtualMailManager/cli/subcommands.py
--- a/VirtualMailManager/cli/subcommands.py	Sat Nov 05 15:43:23 2011 +0000
+++ b/VirtualMailManager/cli/subcommands.py	Sat Nov 05 16:41:19 2011 +0000
@@ -214,12 +214,12 @@
         ctx.hdlr.domain_add(ctx.args[2].lower())
     else:
         ctx.hdlr.domain_add(ctx.args[2].lower(), ctx.args[3])
-    if not ctx.cget('domain.auto_postmaster'):
-        return
-    ctx.scmd = 'useradd'
-    ctx.args = [prog, ctx.scmd, u'postmaster@' + ctx.args[2].lower()]
-    ctx.argc = 3
-    user_add(ctx)
+    if ctx.cget('domain.auto_postmaster'):
+        w_std(_(u'Creating account for postmaster@%s') % ctx.args[2].lower())
+        ctx.scmd = 'useradd'
+        ctx.args = [prog, ctx.scmd, u'postmaster@' + ctx.args[2].lower()]
+        ctx.argc = 3
+        user_add(ctx)
 
 
 def domain_delete(ctx):