Kaydet (Commit) 9ac783d7 authored tarafından Kurt B. Kaiser's avatar Kurt B. Kaiser

M PyShell.py

M rpc.py
Improve exception handing if peer process has terminated.
üst 98b15ab9
...@@ -400,7 +400,10 @@ class ModifiedInterpreter(InteractiveInterpreter): ...@@ -400,7 +400,10 @@ class ModifiedInterpreter(InteractiveInterpreter):
from signal import SIGINT from signal import SIGINT
except ImportError: except ImportError:
SIGINT = 2 SIGINT = 2
os.kill(self.rpcpid, SIGINT) try:
os.kill(self.rpcpid, SIGINT)
except OSError: # subprocess may have already exited
pass
def __request_interrupt(self): def __request_interrupt(self):
self.rpcclt.asynccall("exec", "interrupt_the_server", (), {}) self.rpcclt.asynccall("exec", "interrupt_the_server", (), {})
......
...@@ -166,6 +166,8 @@ class SocketIO: ...@@ -166,6 +166,8 @@ class SocketIO:
return ("OK", ret) return ("OK", ret)
except SystemExit: except SystemExit:
raise raise
except socket.error:
pass
except: except:
self.debug("localcall:EXCEPTION") self.debug("localcall:EXCEPTION")
traceback.print_exc(file=sys.__stderr__) traceback.print_exc(file=sys.__stderr__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment