# HG changeset patch # User catherine@DellZilla # Date 1255103570 14400 # Node ID e02b85e6aee1dd42852ae3af68fa4492b551da37 # Parent bff1f19275e7852bdfb9ca5a2d9d3ab052adc9fb do not poutput empty messages diff -r bff1f19275e7 -r e02b85e6aee1 cmd2.py --- a/cmd2.py Fri Oct 09 09:10:17 2009 -0400 +++ b/cmd2.py Fri Oct 09 11:52:50 2009 -0400 @@ -282,9 +282,10 @@ settable.sort() def poutput(self, msg): - self.stdout.write(msg) - if msg[-1] != '\n': - self.stdout.write('\n') + if msg: + self.stdout.write(msg) + if msg[-1] != '\n': + self.stdout.write('\n') def perror(self, errmsg, statement=None): if self.debug: traceback.print_exc()