[svn r63562] fixing _com regarding pyevents as well
--HG-- branch : trunk
This commit is contained in:
parent
54cc936437
commit
e7e1b2725b
|
@ -51,7 +51,11 @@ class MultiCall:
|
|||
if needscall:
|
||||
res = currentmethod(self, *self.args, **self.kwargs)
|
||||
else:
|
||||
res = currentmethod(*self.args, **self.kwargs)
|
||||
#try:
|
||||
res = currentmethod(*self.args, **self.kwargs)
|
||||
#except TypeError:
|
||||
# print currentmethod.__module__, currentmethod.__name__, self.args, self.kwargs
|
||||
# raise
|
||||
if hasattr(self, '_ex1'):
|
||||
self.results = [res]
|
||||
break
|
||||
|
@ -152,7 +156,6 @@ class PyPlugins:
|
|||
MultiCall(self.listattr("pyevent__" + eventname),
|
||||
*args, **kwargs).execute()
|
||||
#print "calling anonymous hooks", args, kwargs
|
||||
MultiCall(self.listattr("pyevent"),
|
||||
eventname, *args, **kwargs).execute()
|
||||
MultiCall(self.listattr("pyevent"), eventname, args, kwargs).execute()
|
||||
|
||||
pyplugins = PyPlugins()
|
||||
|
|
|
@ -181,7 +181,7 @@ class TestPyPlugins:
|
|||
def pyevent__hello(self):
|
||||
l.append("hellospecific")
|
||||
class api2:
|
||||
def pyevent(self, name, *args):
|
||||
def pyevent(self, name, args, kwargs):
|
||||
if name == "hello":
|
||||
l.append(name + "anonymous")
|
||||
plugins.register(api1())
|
||||
|
@ -240,7 +240,7 @@ class TestPyPluginsEvents:
|
|||
plugins = PyPlugins()
|
||||
l = []
|
||||
class A:
|
||||
def pyevent(self, name, *args, **kwargs):
|
||||
def pyevent(self, name, args, kwargs):
|
||||
if name == "name":
|
||||
l.extend([args, kwargs])
|
||||
|
||||
|
|
Loading…
Reference in New Issue