diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-10-30 17:15:02 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-10-30 17:15:02 -0400 |
commit | eee9a5e3406fb6c1862bc7d3f59d62d0e45b3a79 (patch) | |
tree | 19e8fec93c32d9e40dc57d1898a0b4f7072bbad5 | |
parent | 23cfa3e2665c4fdbd22c781fe5b86bf034da71f8 (diff) | |
download | cmd2-git-eee9a5e3406fb6c1862bc7d3f59d62d0e45b3a79.tar.gz |
Only removing ipy from cmd2 instances instead of the class when use_ipython is False
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |