summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-02-10 13:23:56 +0100
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-02-10 13:23:56 +0100
commit10f1f8c6a49fa96ffb420eaa8cdd3641128ec9ec (patch)
treef56f34afc09838ff917f975e6d9e548a779b2483 /src/python/m5
parent6155400421a478ddb23e377acd6c8db5a32ee468 (diff)
downloadgem5-10f1f8c6a49fa96ffb420eaa8cdd3641128ec9ec.tar.xz
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.
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/main.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py
index ce2979cd2..03fab9901 100644
--- a/src/python/m5/main.py
+++ b/src/python/m5/main.py
@@ -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)