[Idle-dev] CVS: idle run.py,1.17,1.18
Kurt B. Kaiser
kbk@users.sourceforge.net
Sat, 17 May 2003 14:04:13 -0700
Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv24334
Modified Files:
run.py
Log Message:
Show Freddy the mirror
i.e. improve subprocess exit paths and exeception reporting
Index: run.py
===================================================================
RCS file: /cvsroot/idlefork/idle/run.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** run.py 14 May 2003 18:15:40 -0000 1.17
--- run.py 17 May 2003 21:04:10 -0000 1.18
***************
*** 54,58 ****
try:
if exit_requested:
! os._exit(0)
try:
seq, request = rpc.request_queue.get(0)
--- 54,58 ----
try:
if exit_requested:
! sys.exit(0)
try:
seq, request = rpc.request_queue.get(0)
***************
*** 65,71 ****
except KeyboardInterrupt:
continue
except:
! print_exception()
! rpc.response_queue.put((seq, None))
continue
--- 65,77 ----
except KeyboardInterrupt:
continue
+ except SystemExit:
+ raise
except:
! try:
! print_exception()
! rpc.response_queue.put((seq, None))
! except:
! traceback.print_exc(file=sys.__stderr__)
! sys.exit(1.1)
continue
***************
*** 208,218 ****
exec code in self.locals
except:
try:
! if exit_requested:
! os._exit(0)
print_exception()
except:
! sys.stderr = sys.__stderr__
! raise
else:
flush_stdout()
--- 214,226 ----
exec code in self.locals
except:
+ if exit_requested:
+ sys.exit(0)
try:
! # even print a user code SystemExit exception, continue
print_exception()
except:
! # link not working?
! traceback.print_exc(file=sys.__stderr__)
! sys.exit(1.2)
else:
flush_stdout()