[Yt-svn] yt-commit r1764 - trunk/yt

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Fri Jun 25 10:35:15 PDT 2010


Author: mturk
Date: Fri Jun 25 10:35:14 2010
New Revision: 1764
URL: http://yt.enzotools.org/changeset/1764

Log:
Changing SIGUSR2 to insert an IPython session



Modified:
   trunk/yt/funcs.py

Modified: trunk/yt/funcs.py
==============================================================================
--- trunk/yt/funcs.py	(original)
+++ trunk/yt/funcs.py	Fri Jun 25 10:35:14 2010
@@ -361,6 +361,9 @@
 def signal_problem(signo, frame):
     raise RuntimeError()
 
+def signal_ipython(signo, frame):
+    insert_ipython(2)
+
 # We use two signals, SIGUSR1 and SIGUSR2.  In a non-threaded environment,
 # we set up handlers to process these by printing the current stack and to
 # raise a RuntimeError.  The latter can be used, inside pdb, to catch an error
@@ -368,8 +371,8 @@
 try:
     signal.signal(signal.SIGUSR1, signal_print_traceback)
     mylog.debug("SIGUSR1 registered for traceback printing")
-    signal.signal(signal.SIGUSR2, signal_problem)
-    mylog.debug("SIGUSR2 registered for RuntimeError")
+    signal.signal(signal.SIGUSR2, signal_ipython)
+    mylog.debug("SIGUSR2 registered for IPython Insertion")
 except ValueError:  # Not in main thread
     pass
 



More information about the yt-svn mailing list