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
...@@ -595,9 +595,16 @@ class BaseTemplateItem(Implicit, Persistent): ...@@ -595,9 +595,16 @@ class BaseTemplateItem(Implicit, Persistent):
# `expression_instance` is included so as to add compatibility for # `expression_instance` is included so as to add compatibility for
# exporting older catalog methods which might have them as their # exporting older catalog methods which might have them as their
# properties or in their attribute dict. # properties or in their attribute dict.
attr_set.update(('func_code', 'func_defaults', '_code', attr_set.update(
'_lazy_compilation', 'Python_magic', (
'expression_instance')) 'func_code',
'func_defaults',
'_code',
'_lazy_compilation',
'Python_magic',
'Script_magic',
'expression_instance',
))
for attr in 'errors', 'warnings', '_proxy_roles': for attr in 'errors', 'warnings', '_proxy_roles':
if not obj.__dict__.get(attr, 1): if not obj.__dict__.get(attr, 1):
delattr(obj, attr) 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