VirtualMailManager/cli/subcommands.py
branchv0.7.x
changeset 640 ebacd11563b0
parent 638 0de0b9e75c9f
child 643 df1e3b67882a
equal deleted inserted replaced
639:d50fe67778c6 640:ebacd11563b0
   500     _print_domain_list(gids, domains, matching)
   500     _print_domain_list(gids, domains, matching)
   501 
   501 
   502 
   502 
   503 def list_pwschemes(ctx_unused):
   503 def list_pwschemes(ctx_unused):
   504     """Prints all usable password schemes and password encoding suffixes."""
   504     """Prints all usable password schemes and password encoding suffixes."""
   505     # TODO: Remove trailing colons from keys.
   505     keys = (_(u'Usable password schemes'), _(u'Usable encoding suffixes'))
   506     # For now it is to late, the translators has stared their work
       
   507     keys = (_(u'Usable password schemes:'), _(u'Usable encoding suffixes:'))
       
   508     old_ii, old_si = txt_wrpr.initial_indent, txt_wrpr.subsequent_indent
   506     old_ii, old_si = txt_wrpr.initial_indent, txt_wrpr.subsequent_indent
   509     txt_wrpr.initial_indent = txt_wrpr.subsequent_indent = '\t'
   507     txt_wrpr.initial_indent = txt_wrpr.subsequent_indent = '\t'
   510     txt_wrpr.width = txt_wrpr.width - 8
   508     txt_wrpr.width = txt_wrpr.width - 8
   511 
   509 
   512     for key, value in zip(keys, list_schemes()):
   510     for key, value in zip(keys, list_schemes()):
   513         if key.endswith(':'):  # who knows … (see TODO above)
       
   514             #key = key.rpartition(':')[0]
       
   515             key = key[:-1]  # This one is for Py24
       
   516         w_std(key, len(key) * '-')
   511         w_std(key, len(key) * '-')
   517         w_std('\n'.join(txt_wrpr.wrap(' '.join(value))), '')
   512         w_std('\n'.join(txt_wrpr.wrap(' '.join(value))), '')
   518 
   513 
   519     txt_wrpr.initial_indent, txt_wrpr.subsequent_indent = old_ii, old_si
   514     txt_wrpr.initial_indent, txt_wrpr.subsequent_indent = old_ii, old_si
   520     txt_wrpr.width = txt_wrpr.width + 8
   515     txt_wrpr.width = txt_wrpr.width + 8