Commit 80c347b8 authored by Levin Zimmermann's avatar Levin Zimmermann Committed by Kazuhiko Shiozaki

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 79c93041
......@@ -164,7 +164,7 @@ class Alarm(XMLObject, PeriodicityMixin):
activate_kw['tag'] = '%s_%x' % (self.getRelativeUrl(), getrandbits(32))
tag = activate_kw['tag']
method = getattr(self, method_id)
func_code = method.__code__
func_code = getattr(method, '__code__', None)
if func_code is None: # BBB Zope2
func_code = method.func_code
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