diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-24 22:02:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 22:02:51 -0400 |
commit | 3c51b9f32d35c05847c302646575dab576430a01 (patch) | |
tree | 911473c26ca90e0b88084ca5889b180b438005e4 /cmd2/cmd2.py | |
parent | c8890646d88fab3e07ccd71b30c2fed3785a7d5e (diff) | |
parent | 3a7dff372be39ef668a93f2cee9c40291f096521 (diff) | |
download | cmd2-git-3c51b9f32d35c05847c302646575dab576430a01.tar.gz |
Merge pull request #538 from python-cmd2/unit_tests
Fix pyscript related unit tests
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index c2d3eb1c..972a2be4 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2695,9 +2695,11 @@ Usage: Usage: unalias [-a] name [name ...] Non-python commands can be issued with ``pyscript_name("your command")``. Run python code from external script files with ``run("script.py")`` """ - from .pyscript_bridge import PyscriptBridge + from .pyscript_bridge import PyscriptBridge, CommandResult if self._in_py: - self.perror("Recursively entering interactive Python consoles is not allowed.", traceback_war=False) + err = "Recursively entering interactive Python consoles is not allowed." + self.perror(err, traceback_war=False) + self._last_result = CommandResult('', err) return False self._in_py = True |