VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 542 c3b98364f03d
parent 539 5806fb74130b
child 551 62f2daff853e
equal deleted inserted replaced
541:a582f1452bc0 542:c3b98364f03d
   896         if upper:
   896         if upper:
   897             w_std(u'\t%s: %s' % (key.upper().ljust(17, u'.'), info[key]))
   897             w_std(u'\t%s: %s' % (key.upper().ljust(17, u'.'), info[key]))
   898         else:
   898         else:
   899             w_std(u'\t%s: %s' % (key.title().ljust(17, u'.'), info[key]))
   899             w_std(u'\t%s: %s' % (key.title().ljust(17, u'.'), info[key]))
   900     print
   900     print
   901 
   901     note = info.get('note', None)
       
   902     if note is not None:
       
   903         _print_note(note)
       
   904 
       
   905 def _print_note(note):
       
   906     msg = _(u'Note')
       
   907     w_std(msg, u'-' * len(msg))
       
   908     old_ii = txt_wrpr.initial_indent
       
   909     old_si = txt_wrpr.subsequent_indent
       
   910     txt_wrpr.initial_indent = txt_wrpr.subsequent_indent = '\t'
       
   911     txt_wrpr.width -= 8
       
   912     for para in note.split('\n'):
       
   913         w_std(txt_wrpr.fill(para))
       
   914     txt_wrpr.width += 8
       
   915     txt_wrpr.subsequent_indent = old_si
       
   916     txt_wrpr.initial_indent = old_ii
   902 
   917 
   903 def _print_list(alist, title):
   918 def _print_list(alist, title):
   904     """Print a list."""
   919     """Print a list."""
   905     # TP: used in e.g. 'Existing alias addresses' or 'Existing accounts'
   920     # TP: used in e.g. 'Existing alias addresses' or 'Existing accounts'
   906     msg = u'%s %s' % (_(u'Existing'), title)
   921     msg = u'%s %s' % (_(u'Existing'), title)