Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions cmd2/cmd2.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
: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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a better way to deal with it, good call

except AttributeError:
pass

Expand Down