summaryrefslogtreecommitdiff
path: root/cmd2/pyscript_bridge.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-10-05 16:18:38 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-10-05 16:18:38 -0400
commitafd10b31e8c3064301e008299aeaff6d5b2fdcdf (patch)
tree86dd3142e0ccd7ef7a3c451237d5cd820c2bfe21 /cmd2/pyscript_bridge.py
parentc480f3a2e940757a6698f9270db503ebf4111fd7 (diff)
downloadcmd2-git-afd10b31e8c3064301e008299aeaff6d5b2fdcdf.tar.gz
Simplified code
Diffstat (limited to 'cmd2/pyscript_bridge.py')
-rw-r--r--cmd2/pyscript_bridge.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py
index dcfd9116..7c09aab0 100644
--- a/cmd2/pyscript_bridge.py
+++ b/cmd2/pyscript_bridge.py
@@ -38,7 +38,7 @@ class CommandResult(namedtuple_with_defaults('CommandResult', ['stdout', 'stderr
# If data has a __bool__ method, then call it to determine success of command
if self.data is not None and callable(getattr(self.data, '__bool__', None)):
- return True if self.data else False
+ return bool(self.data)
# Otherwise check if stderr was filled out
else: