diff options
Diffstat (limited to 'cmd2/py_bridge.py')
-rw-r--r-- | cmd2/py_bridge.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd2/py_bridge.py b/cmd2/py_bridge.py index cd81c6b8..7570c1a8 100644 --- a/cmd2/py_bridge.py +++ b/cmd2/py_bridge.py @@ -33,7 +33,6 @@ class CommandResult(NamedTuple): :stdout: str - output captured from stdout while this command is executing :stderr: str - output captured from stderr while this command is executing - None if no error captured. :stop: bool - return value of onecmd_plus_hooks after it runs the given command line. :data: possible data populated by the command. @@ -66,7 +65,7 @@ class CommandResult(NamedTuple): """ stdout: str = '' - stderr: Optional[str] = None + stderr: str = '' stop: bool = False data: Any = None @@ -135,7 +134,7 @@ class PyBridge: # Save the output. If stderr is empty, set it to None. result = CommandResult( stdout=copy_cmd_stdout.getvalue(), - stderr=copy_stderr.getvalue() if copy_stderr.getvalue() else None, + stderr=copy_stderr.getvalue(), stop=stop, data=self._cmd2_app.last_result, ) |