diff options
| author | Ewan Mellor <ewan.mellor@citrix.com> | 2010-07-29 12:37:30 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-07-29 12:37:30 +0000 |
| commit | 37b9de911f1c5100aa3c9fd18f07c9ebd5ee5560 (patch) | |
| tree | 057ef6bedf567ff072af12358e1e3b1cbd2c97c5 /nova/process.py | |
| parent | efc6317108b09311d6830b333a36714feeb2532b (diff) | |
| parent | bc96d6daa425f7c38d67ad43b8cf46f3ba5989c3 (diff) | |
Fixed assertion "Someone released me too many times: too many tokens!"
Diffstat (limited to 'nova/process.py')
| -rw-r--r-- | nova/process.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nova/process.py b/nova/process.py index d3558ed2e..2dc56372f 100644 --- a/nova/process.py +++ b/nova/process.py @@ -205,13 +205,13 @@ class ProcessPool(object): self._pool.release() return rv -class SharedPool(ProcessPool): +class SharedPool(object): _instance = None - def __new__(cls, *args, **kwargs): - if not cls._instance: - cls._instance = super(SharedPool, cls).__new__( - cls, *args, **kwargs) - return cls._instance + def __init__(self): + if SharedPool._instance is None: + self.__class__._instance = ProcessPool() + def __getattr__(self, key): + return getattr(self._instance, key) def simple_execute(cmd, **kwargs): return SharedPool().simple_execute(cmd, **kwargs) |
