changeset ff4b1bde5f60 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ff4b1bde5f60
description:
        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:

 src/python/m5/main.py |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 50da272a1300 -r ff4b1bde5f60 src/python/m5/main.py
--- a/src/python/m5/main.py     Sun Feb 10 13:23:54 2013 +0100
+++ b/src/python/m5/main.py     Sun Feb 10 13:23:56 2013 +0100
@@ -129,10 +129,9 @@
 
 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)
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to