VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 429 9842650569c2
parent 423 a43a2e20de71
child 445 b8c94e06cd46
equal deleted inserted replaced
428:0d8e7977ae63 429:9842650569c2
   782     print
   782     print
   783 
   783 
   784 
   784 
   785 def _print_list(alist, title):
   785 def _print_list(alist, title):
   786     """Print a list."""
   786     """Print a list."""
   787     # TP: used in e.g. 'Available alias addresses' or 'Available accounts'
   787     # TP: used in e.g. 'Existing alias addresses' or 'Existing accounts'
   788     msg = u'%s %s' % (_(u'Available'), title)
   788     msg = u'%s %s' % (_(u'Existing'), title)
   789     w_std(msg, u'-' * len(msg))
   789     w_std(msg, u'-' * len(msg))
   790     if alist:
   790     if alist:
   791         if title != _(u'alias domains'):
   791         if title != _(u'alias domains'):
   792             w_std(*(u'\t%s' % item for item in alist))
   792             w_std(*(u'\t%s' % item for item in alist))
   793         else:
   793         else:
   829 def _print_domain_list(dids, domains, matching):
   829 def _print_domain_list(dids, domains, matching):
   830     """Print a list of (matching) domains/alias domains."""
   830     """Print a list of (matching) domains/alias domains."""
   831     if matching:
   831     if matching:
   832         title = _(u'Matching domains')
   832         title = _(u'Matching domains')
   833     else:
   833     else:
   834         title = _(u'Available domains')
   834         title = _(u'Existing domains')
   835     w_std(title, '-' * len(title))
   835     w_std(title, '-' * len(title))
   836     if domains:
   836     if domains:
   837         for did in dids:
   837         for did in dids:
   838             if domains[did][0] is not None:
   838             if domains[did][0] is not None:
   839                 w_std(_format_domain(domains[did][0]))
   839                 w_std(_format_domain(domains[did][0]))