Skip to content

Commit 1aa8d45

Browse files
authored
Merge branch 'master' into history_edit
2 parents 244af20 + 406f017 commit 1aa8d45

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## 0.9.20 (TBD, 2019)
2+
* Bug Fixes
3+
* Fixed bug where setting `use_ipython` to False removed ipy command from the entire `cmd2.Cmd` class instead of
4+
just the instance being created
25
* Enhancements
36
* Send all startup script paths to run_script. Previously we didn't do this if the file was empty, but that
47
showed no record of the run_script command in history.

cmd2/cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
368368
:param shortcuts: dictionary containing shortcuts for commands. If not supplied, then defaults to
369369
constants.DEFAULT_SHORTCUTS.
370370
"""
371-
# If use_ipython is False, make sure the do_ipy() method doesn't exit
371+
# If use_ipython is False, make sure the ipy command isn't available in this instance
372372
if not use_ipython:
373373
try:
374-
del Cmd.do_ipy
374+
self.do_ipy = None
375375
except AttributeError:
376376
pass
377377

0 commit comments

Comments
 (0)