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

index db07628d4ed3dc393b8e01440521a91f677dc2d2..eb11a276a4927ffb22b782c7478606adae08484a 100644 (file)
@@ -23,7 +23,7 @@ class ProcessInfo:
         self.max_errors = max_errors
         self.clear()
     def clear(self):
-        self.dont_run = False
+        self._dont_run = False
         self.signal = None
         self.process = None
         self.error_count = 0
@@ -36,7 +36,7 @@ class ProcessInfo:
         self.process = subprocess.Popen(self.command, *self.args, **self.kwargs)
     def stop(self):
         assert self.process is not None
-        self.dont_run = True
+        self._dont_run = True
         if self.signal == signal.SIGTERM or self.signal == signal.SIGKILL:
             # Allready stopped, kill it
             self.kill(signal.SIGKILL)
@@ -143,10 +143,10 @@ class ProcessManager:
                     log.debug(u'ProcessManager.sigchild_handler: '
                                   u'calling %s(%s)', p.callback.__name__, p)
                     p.callback(self, p)
-                if p.dont_run or not p.persist or p.error_count >= p.max_errors:
+                if p._dont_run or not p.persist or p.error_count >= p.max_errors:
                     log.debug(u"ProcessManager.sigchild_handler: can't "
                             u'persist, dont_run=%s, persist=%s, error_cout=%s, '
-                            u'max_errors=%s', p.dont_run, p.persist,
+                            u'max_errors=%s', p._dont_run, p.persist,
                             p.error_count, p.max_errors)
                     del self.namemap[p.name]
                     del self.pidmap[pid]