Commit 653b2daa authored by Jérome Perrin's avatar Jérome Perrin

BusinessTemplate: do not export PythonScripts' Script_magic

This is used to trigger recompilation of bytecode, but we don't
export the byte code so we don't need to export it.
This also prevent diffs when the Script_magic changed, like it's the
case with Products.PythonScripts 4.2 , with commit 590125a (Force
recompilation of scripts., 2017-10-23)
parent c020b284
Pipeline #20880 failed with stage
in 0 seconds
......@@ -595,9 +595,16 @@ class BaseTemplateItem(Implicit, Persistent):
# `expression_instance` is included so as to add compatibility for
# exporting older catalog methods which might have them as their
# properties or in their attribute dict.
attr_set.update(('func_code', 'func_defaults', '_code',
'_lazy_compilation', 'Python_magic',
'expression_instance'))
attr_set.update(
(
'func_code',
'func_defaults',
'_code',
'_lazy_compilation',
'Python_magic',
'Script_magic',
'expression_instance',
))
for attr in 'errors', 'warnings', '_proxy_roles':
if not obj.__dict__.get(attr, 1):
delattr(obj, attr)
......
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