VirtualMailManager/cli/subcommands.py
branchv0.6.x
changeset 542 c3b98364f03d
parent 539 5806fb74130b
child 551 62f2daff853e
--- a/VirtualMailManager/cli/subcommands.py	Sat Apr 14 21:20:06 2012 +0200
+++ b/VirtualMailManager/cli/subcommands.py	Sat Apr 14 22:52:40 2012 +0200
@@ -898,7 +898,22 @@
         else:
             w_std(u'\t%s: %s' % (key.title().ljust(17, u'.'), info[key]))
     print
+    note = info.get('note', None)
+    if note is not None:
+        _print_note(note)
 
+def _print_note(note):
+    msg = _(u'Note')
+    w_std(msg, u'-' * len(msg))
+    old_ii = txt_wrpr.initial_indent
+    old_si = txt_wrpr.subsequent_indent
+    txt_wrpr.initial_indent = txt_wrpr.subsequent_indent = '\t'
+    txt_wrpr.width -= 8
+    for para in note.split('\n'):
+        w_std(txt_wrpr.fill(para))
+    txt_wrpr.width += 8
+    txt_wrpr.subsequent_indent = old_si
+    txt_wrpr.initial_indent = old_ii
 
 def _print_list(alist, title):
     """Print a list."""