DebugClients/Python/DebugThread.py

branch
jsonrpc
changeset 5132
a094eee9f862
parent 4631
5c1a96925da4
diff -r 889ed5ff7a68 -r a094eee9f862 DebugClients/Python/DebugThread.py
--- a/DebugClients/Python/DebugThread.py	Sat Sep 03 18:01:19 2016 +0200
+++ b/DebugClients/Python/DebugThread.py	Sat Sep 03 18:02:37 2016 +0200
@@ -23,7 +23,7 @@
     call to step etc.
     """
     def __init__(self, dbgClient, targ=None, args=None, kwargs=None,
-                 mainThread=0):
+                 mainThread=False):
         """
         Constructor
         
@@ -31,7 +31,7 @@
         @param targ the target method in the run thread
         @param args  arguments to be passed to the thread
         @param kwargs arguments to be passed to the thread
-        @param mainThread 0 if this thread is not the mainscripts thread
+        @param mainThread False if this thread is not the main script's thread
         """
         DebugBase.__init__(self, dbgClient)
         
@@ -42,7 +42,7 @@
         # thread running tracks execution state of client code
         # it will always be 0 for main thread as that is tracked
         # by DebugClientThreads and Bdb...
-        self._threadRunning = 0
+        self._threadRunning = False
         
         self.__ident = None  # id of this thread.
         self.__name = ""
@@ -89,14 +89,14 @@
         """
         try:
             try:
-                self._threadRunning = 1
+                self._threadRunning = True
                 self.traceThread()
                 self._target(*self._args, **self._kwargs)
             except bdb.BdbQuit:
                 pass
         finally:
-            self._threadRunning = 0
-            self.quitting = 1
+            self._threadRunning = False
+            self.quitting = True
             self._dbgClient.threadTerminated(self)
             sys.settrace(None)
             sys.setprofile(None)

eric ide

mercurial