VMM/cli/subcommands: Update also the RunContext's subcommand if
'plan A' in {,alias}domain_info() fails.
--- 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