Mercurial > python-cmd2
changeset 284:e02b85e6aee1
do not poutput empty messages
author | catherine@DellZilla |
---|---|
date | Fri, 09 Oct 2009 11:52:50 -0400 |
parents | bff1f19275e7 |
children | 58be960b8bf9 |
files | cmd2.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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()