VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 474 4353981e3a7f
parent 471 5d0114f7bb99
child 481 90d69ae4f40d
equal deleted inserted replaced
473:9b9cccebccf0 474:4353981e3a7f
   261     else:
   261     else:
   262         q_limit = u'Storage: %(bytes)s; Messages: %(messages)s'
   262         q_limit = u'Storage: %(bytes)s; Messages: %(messages)s'
   263         if not details:
   263         if not details:
   264             info['bytes'] = human_size(info['bytes'])
   264             info['bytes'] = human_size(info['bytes'])
   265             info['messages'] = locale.format('%d', info['messages'], True)
   265             info['messages'] = locale.format('%d', info['messages'], True)
   266             info['quota limit'] = q_limit % info
   266             info['quota limit/user'] = q_limit % info
   267             _print_info(ctx, info, _(u'Domain'))
   267             _print_info(ctx, info, _(u'Domain'))
   268         else:
   268         else:
   269             info[0]['bytes'] = human_size(info[0]['bytes'])
   269             info[0]['bytes'] = human_size(info[0]['bytes'])
   270             info[0]['messages'] = locale.format('%d', info[0]['messages'],
   270             info[0]['messages'] = locale.format('%d', info[0]['messages'],
   271                                                 True)
   271                                                 True)
   272             info[0]['quota limit'] = q_limit % info[0]
   272             info[0]['quota limit/user'] = q_limit % info[0]
   273             _print_info(ctx, info[0], _(u'Domain'))
   273             _print_info(ctx, info[0], _(u'Domain'))
   274             if details == u'accounts':
   274             if details == u'accounts':
   275                 _print_list(info[1], _(u'accounts'))
   275                 _print_list(info[1], _(u'accounts'))
   276             elif details == u'aliasdomains':
   276             elif details == u'aliasdomains':
   277                 _print_list(info[1], _(u'alias domains'))
   277                 _print_list(info[1], _(u'alias domains'))
   762     """returns a tuple with (key, 1||0) tuples. Used by functions, which
   762     """returns a tuple with (key, 1||0) tuples. Used by functions, which
   763     get a dict from the handler."""
   763     get a dict from the handler."""
   764     order = ()
   764     order = ()
   765     if ctx.scmd == 'domaininfo':
   765     if ctx.scmd == 'domaininfo':
   766         order = ((u'domain name', 0), (u'gid', 1), (u'domain directory', 0),
   766         order = ((u'domain name', 0), (u'gid', 1), (u'domain directory', 0),
   767                  (u'quota limit', 0), (u'active services', 0),
   767                  (u'quota limit/user', 0), (u'active services', 0),
   768                  (u'transport', 0), (u'alias domains', 0), (u'accounts', 0),
   768                  (u'transport', 0), (u'alias domains', 0), (u'accounts', 0),
   769                  (u'aliases', 0), (u'relocated', 0))
   769                  (u'aliases', 0), (u'relocated', 0))
   770     elif ctx.scmd == 'userinfo':
   770     elif ctx.scmd == 'userinfo':
   771         if ctx.argc == 4 and ctx.args[3] != u'aliases' or \
   771         if ctx.argc == 4 and ctx.args[3] != u'aliases' or \
   772            ctx.cget('account.disk_usage'):
   772            ctx.cget('account.disk_usage'):