From 03f90d0ec0193c4a8ef74ae4f455fa3f7228e7cd Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 18 May 2008 23:17:28 -0300 Subject: [PATCH] Make procman.ProcessInfo.name a read-only property. --- pymin/procman.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pymin/procman.py b/pymin/procman.py index 2955863..db07628 100644 --- a/pymin/procman.py +++ b/pymin/procman.py @@ -12,7 +12,7 @@ __all__ = ('ProcessManager', 'manager', 'register', 'unregister', 'once', class ProcessInfo: def __init__(self, name, command, callback=None, persist=False, max_errors=3, args=None, kwargs=None): - self.name = name + self._name = name self.command = command self.callback = callback if args is None: args = list() @@ -52,6 +52,9 @@ class ProcessInfo: @property def running(self): return self.process is not None and self.process.poll() is None + @property + def name(self): + return self._name def __repr__(self): pid = None if self.process is not None: -- 2.43.0