diff --git a/blogtopoid/decorators.py b/blogtopoid/decorators.py index 14c2947..867565c 100644 --- a/blogtopoid/decorators.py +++ b/blogtopoid/decorators.py @@ -9,10 +9,10 @@ def singleton(cls): """ instances = {} - def getinstance(): + def getinstance(*args, **kwargs): """ return existing instance of new """ if cls not in instances: - instances[cls] = cls() + instances[cls] = cls(*args, **kwargs) return instances[cls] return getinstance