diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-09-05 20:06:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 20:06:11 -0700 |
commit | 6d711bcb104b5afd0bfb49cbe30410ec5b8fadd5 (patch) | |
tree | 68d6015e2db4311f7742b7140aee6b730fdea054 /cmd2.py | |
parent | 5d5675bac5a8d431fbae1e12daf9b27ca4edfe91 (diff) | |
parent | 25efdfbabeee733247a6d9cd06156b2597f65146 (diff) | |
download | cmd2-git-6d711bcb104b5afd0bfb49cbe30410ec5b8fadd5.tar.gz |
Merge pull request #223 from python-cmd2/poutput_falsy
Improved poutput() so that it can print falsy things
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -585,7 +585,7 @@ class Cmd(cmd.Cmd): :param msg: str - message to print to current stdout - anyting convertible to a str with '{}'.format() is OK :param end: str - string appended after the end of the message if not already present, default a newline """ - if msg: + if msg is not None and msg != '': try: msg_str = '{}'.format(msg) self.stdout.write(msg_str) |