VMM/cli/subcommands: Update also the RunContext's subcommand if v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Fri, 18 Feb 2011 16:14:07 +0000
branchv0.6.x
changeset 409 54a89c19e534
parent 408 f6e55b27fe07
child 410 2bc9c36c1387
VMM/cli/subcommands: Update also the RunContext's subcommand if 'plan A' in {,alias}domain_info() fails.
VirtualMailManager/cli/subcommands.py
--- a/VirtualMailManager/cli/subcommands.py	Fri Feb 18 12:36:09 2011 +0000
+++ b/VirtualMailManager/cli/subcommands.py	Fri Feb 18 16:14:07 2011 +0000
@@ -154,7 +154,7 @@
         if err.code is ALIASDOMAIN_ISDOMAIN:
             w_err(0, ctx.plan_a_b % {'subcommand': u'domaininfo',
                   'object': ctx.args[2].lower()})
-            ctx.args[1] = 'domaininfo'
+            ctx.scmd = ctx.args[1] = 'domaininfo'
             domain_info(ctx)
         else:
             raise
@@ -252,7 +252,7 @@
         if err.code is DOMAIN_ALIAS_EXISTS:
             w_err(0, ctx.plan_a_b % {'subcommand': u'aliasdomaininfo',
                   'object': ctx.args[2].lower()})
-            ctx.args[1] = 'aliasdomaininfo'
+            ctx.scmd = ctx.args[1] = 'aliasdomaininfo'
             aliasdomain_info(ctx)
         else:
             raise