reverted changes to __new__ that broke PluginWiki, need more tests

This commit is contained in:
Massimo Di Pierro committed 2012-01-06 22:57:50 -06:00
1 parent b5d979552f
commit 6060628f65
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2011-12-31 14:37:01) stable Version 1.99.4 (2012-01-06 22:57:17) stable
+2 -2
View File
@@ -4076,7 +4076,7 @@ class PluginManager(object):
True True
""" """
instances = {} instances = {}
def __new__(cls): def __new__(cls,*a,**b):
id = thread.get_ident() id = thread.get_ident()
lock = thread.allocate_lock() lock = thread.allocate_lock()
try: try:
@@ -4084,7 +4084,7 @@ class PluginManager(object):
try: try:
return cls.instances[id] return cls.instances[id]
except KeyError: except KeyError:
instance = object.__new__(cls) instance = object.__new__(cls,*a,**b)
cls.instances[id] = instance cls.instances[id] = instance
return instance return instance
finally: finally: