Commit a3437c62 authored by Levin Zimmermann's avatar Levin Zimmermann

fixup! fixup! Zope2: use func_code if __code__ is missing, that is the case for Script (Python).

nexedi/erp5@21f85a6f
added zope2 compatibility, but nexedi/erp5@21f85a6f (comment 180420) noted
the given assumption isn't true, which is why fixup commit nexedi/erp5@7a2c616e was
added. But nexedi/erp5@21f85a6f (comment 184548) noted
that nexedi/erp5@7a2c616e missed one case,
which is why this fixup commit is added. Now everything should be ok.
parent d93e8fb4
Pipeline #28826 failed with stage
in 0 seconds
...@@ -164,7 +164,7 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -164,7 +164,7 @@ class Alarm(XMLObject, PeriodicityMixin):
activate_kw['tag'] = '%s_%x' % (self.getRelativeUrl(), getrandbits(32)) activate_kw['tag'] = '%s_%x' % (self.getRelativeUrl(), getrandbits(32))
tag = activate_kw['tag'] tag = activate_kw['tag']
method = getattr(self, method_id) method = getattr(self, method_id)
func_code = method.__code__ func_code = getattr(method, '__code__', None)
if func_code is None: # BBB Zope2 if func_code is None: # BBB Zope2
func_code = method.func_code func_code = method.func_code
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment