VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 408 f6e55b27fe07
parent 406 58e23bd7c97f
child 409 54a89c19e534
equal deleted inserted replaced
407:3162ff959375 408:f6e55b27fe07
   255             ctx.args[1] = 'aliasdomaininfo'
   255             ctx.args[1] = 'aliasdomaininfo'
   256             aliasdomain_info(ctx)
   256             aliasdomain_info(ctx)
   257         else:
   257         else:
   258             raise
   258             raise
   259     else:
   259     else:
       
   260         q_limit = u'Storage: %(bytes)s Messages %(messages)u'
   260         if not details:
   261         if not details:
   261             info['quota limit'] = _(u'Storage: %s Messages %u') % (
   262             info['bytes'] = human_size(info['bytes'])
   262                     human_size(info['bytes']), info['messages'])
   263             info['quota limit'] = q_limit % info
   263             _print_info(ctx, info, _(u'Domain'))
   264             _print_info(ctx, info, _(u'Domain'))
   264         else:
   265         else:
   265             info[0]['quota limit'] = _(u'Storage: %s Messages %u') % (
   266             info[0]['bytes'] = human_size(info[0]['bytes'])
   266                     human_size(info[0]['bytes']), info[0]['messages'])
   267             info[0]['quota limit'] = q_limit % info[0]
   267             _print_info(ctx, info[0], _(u'Domain'))
   268             _print_info(ctx, info[0], _(u'Domain'))
   268             if details == u'accounts':
   269             if details == u'accounts':
   269                 _print_list(info[1], _(u'accounts'))
   270                 _print_list(info[1], _(u'accounts'))
   270             elif details == u'aliasdomains':
   271             elif details == u'aliasdomains':
   271                 _print_list(info[1], _(u'alias domains'))
   272                 _print_list(info[1], _(u'alias domains'))