]> git.llucax.com Git - software/pymin.git/commitdiff
Mark procman.ProcessInfo.signal as private.
authorLeandro Lucarella <llucax@gmail.com>
Mon, 19 May 2008 02:20:24 +0000 (23:20 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Wed, 21 May 2008 16:01:57 +0000 (13:01 -0300)
pymin/procman.py

index eb11a276a4927ffb22b782c7478606adae08484a..115f3b41e07fba0f7bda8adf65d3569504da94eb 100644 (file)
@@ -24,7 +24,7 @@ class ProcessInfo:
         self.clear()
     def clear(self):
         self._dont_run = False
-        self.signal = None
+        self._signal = None
         self.process = None
         self.error_count = 0
     def start(self):
@@ -37,7 +37,7 @@ class ProcessInfo:
     def stop(self):
         assert self.process is not None
         self._dont_run = True
-        if self.signal == signal.SIGTERM or self.signal == signal.SIGKILL:
+        if self._signal == signal.SIGTERM or self._signal == signal.SIGKILL:
             # Allready stopped, kill it
             self.kill(signal.SIGKILL)
         else:
@@ -48,7 +48,7 @@ class ProcessInfo:
                       self.process.pid, signum)
         assert self.process is not None
         os.kill(self.process.pid, signum)
-        self.signal = signum
+        self._signal = signum
     @property
     def running(self):
         return self.process is not None and self.process.poll() is None