base: Fix broken IPython argument handling
Prior to this changeset, we used to clear sys.argv before entering the IPython shell. This caused some versions of IPython to crash because they assume argv[0] to exist. The correct way of overriding the arguments passed to IPython is to set the argv keyword argument when initializing the shell.
This commit is contained in:
parent
6155400421
commit
10f1f8c6a4
1 changed files with 1 additions and 2 deletions
|
@ -129,10 +129,9 @@ def parse_options():
|
|||
|
||||
def interact(scope):
|
||||
banner = "gem5 Interactive Console"
|
||||
sys.argv = []
|
||||
try:
|
||||
from IPython.Shell import IPShellEmbed
|
||||
ipshell = IPShellEmbed(banner=banner,user_ns=scope)
|
||||
ipshell = IPShellEmbed(argv=[], banner=banner, user_ns=scope)
|
||||
ipshell()
|
||||
except ImportError:
|
||||
code.InteractiveConsole(scope).interact(banner)
|
||||
|
|
Loading…
Reference in a new issue