diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-10-30 21:53:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 21:53:43 -0400 |
commit | 406f017e2ee99fb76bada7bde4b52c3b0f1aa1d2 (patch) | |
tree | 3b4a6da948a6c5418bb296dec4eb9a77f1ba3b92 | |
parent | 23cfa3e2665c4fdbd22c781fe5b86bf034da71f8 (diff) | |
parent | 8056c5b6c224a603ba7c08c29a260cde4338d83d (diff) | |
download | cmd2-git-406f017e2ee99fb76bada7bde4b52c3b0f1aa1d2.tar.gz |
Merge pull request #794 from python-cmd2/ipy_fix
ipy fix
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | cmd2/cmd2.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e8b2718a..e8225782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## 0.9.20 (TBD, 2019) +* Bug Fixes + * Fixed bug where setting `use_ipython` to False removed ipy command from the entire `cmd2.Cmd` class instead of + just the instance being created * Enhancements * Send all startup script paths to run_script. Previously we didn't do this if the file was empty, but that showed no record of the run_script command in history. diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 7d2cad20..6a600107 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -368,10 +368,10 @@ class Cmd(cmd.Cmd): :param shortcuts: dictionary containing shortcuts for commands. If not supplied, then defaults to constants.DEFAULT_SHORTCUTS. """ - # If use_ipython is False, make sure the do_ipy() method doesn't exit + # If use_ipython is False, make sure the ipy command isn't available in this instance if not use_ipython: try: - del Cmd.do_ipy + self.do_ipy = None except AttributeError: pass |