DebugClients/Python3/DebugClientBase.py

branch
6_1_x
changeset 4946
c7b333448ad5
parent 4848
36b1d9bec8f6
child 4947
20dcf00d83b3
diff -r 78287a4f976b -r c7b333448ad5 DebugClients/Python3/DebugClientBase.py
--- a/DebugClients/Python3/DebugClientBase.py	Tue Apr 12 18:59:51 2016 +0200
+++ b/DebugClients/Python3/DebugClientBase.py	Sun Apr 17 21:26:28 2016 +0200
@@ -575,7 +575,7 @@
                         res = exc.code
                         atexit._run_exitfuncs()
                     self.writestream.flush()
-                    self.progTerminated(res, exit=True)
+                    self.progTerminated(res)
                 return
 
             if cmd == DebugProtocol.RequestProfile:
@@ -621,7 +621,7 @@
                         atexit._run_exitfuncs()
                     self.prof.save()
                     self.writestream.flush()
-                    self.progTerminated(res, exit=True)
+                    self.progTerminated(res)
                 return
 
             if cmd == DebugProtocol.RequestCoverage:
@@ -672,7 +672,7 @@
                     self.cover.stop()
                     self.cover.save()
                     self.writestream.flush()
-                    self.progTerminated(res, exit=True)
+                    self.progTerminated(res)
                 return
 
             if cmd == DebugProtocol.RequestShutdown:
@@ -1050,7 +1050,7 @@
 
     def __interact(self):
         """
-        Private method to Interact with  the debugger.
+        Private method to Interact with the debugger.
         """
         global DebugClientInstance
 
@@ -1074,6 +1074,9 @@
         while self.eventExit is None:
             wrdy = []
 
+            if self.writestream.nWriteErrors > self.writestream.maxtries:
+                break
+            
             if AsyncPendingWrite(self.writestream):
                 wrdy.append(self.writestream)
 
@@ -1307,13 +1310,12 @@
         """
         return self.running
 
-    def progTerminated(self, status, exit=False):
+    def progTerminated(self, status):
         """
         Public method to tell the debugger that the program has terminated.
         
         @param status return status
-        @param exit flag indicating to perform a sys.exit()
-        @type bool
+        @type int
         """
         if status is None:
             status = 0
@@ -1327,9 +1329,6 @@
             self.set_quit()
             self.running = None
             self.write('{0}{1:d}\n'.format(DebugProtocol.ResponseExit, status))
-            if exit:
-                self.writestream.close(True)
-                sys.exit(status)
         
         # reset coding
         self.__coding = self.defaultCoding

eric ide

mercurial