VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 561 b0165b7af7a3
parent 559 cc0f67f99780
child 565 a75923ce2842
equal deleted inserted replaced
560:2662f4e17eb4 561:b0165b7af7a3
   922         }
   922         }
   923     if limit:
   923     if limit:
   924         q_usage['percent'] = locale.format('%6.2f', 100. / limit * used, True)
   924         q_usage['percent'] = locale.format('%6.2f', 100. / limit * used, True)
   925     else:
   925     else:
   926         q_usage['percent'] = locale.format('%6.2f', 0, True)
   926         q_usage['percent'] = locale.format('%6.2f', 0, True)
   927     fmt = format_domain_default if domaindefault else lambda s: s
   927     #  Py25: fmt = format_domain_default if domaindefault else lambda s: s
       
   928     if domaindefault:
       
   929         fmt = format_domain_default
       
   930     else:
       
   931         fmt = lambda s: s
   928     return fmt(_(u'[%(percent)s%%] %(used)s/%(limit)s') % q_usage)
   932     return fmt(_(u'[%(percent)s%%] %(used)s/%(limit)s') % q_usage)
   929 
   933 
   930 
   934 
   931 def _print_info(ctx, info, title):
   935 def _print_info(ctx, info, title):
   932     """Print info dicts."""
   936     """Print info dicts."""