Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
c0265bad
Commit
c0265bad
authored
May 10, 2022
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fixup: add compatibility with missing __code__ attribute"
This reverts commit
4f400904
.
parent
be7a202f
Pipeline
#21403
running with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
product/ERP5/Document/Alarm.py
product/ERP5/Document/Alarm.py
+1
-7
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+2
-9
No files found.
product/ERP5/Document/Alarm.py
View file @
c0265bad
...
...
@@ -164,13 +164,7 @@ class Alarm(XMLObject, PeriodicityMixin):
activate_kw
[
'tag'
]
=
'%s_%x'
%
(
self
.
getRelativeUrl
(),
getrandbits
(
32
))
tag
=
activate_kw
[
'tag'
]
method
=
getattr
(
self
,
method_id
)
try
:
func_code
=
method
.
__code__
except
AttributeError
:
# Compatibility with not migrated python script
# See https://lab.nexedi.com/nexedi/erp5/commit/4115e4658f50a48d3cd4b10e0ae033a3aaa3e273
func_code
=
method
.
func_code
func_code
=
method
.
__code__
try
:
has_kw
=
func_code
.
co_flags
&
CO_VARKEYWORDS
except
AttributeError
:
...
...
product/ZSQLCatalog/SQLCatalog.py
View file @
c0265bad
...
...
@@ -1452,11 +1452,7 @@ class Catalog(Folder,
if
meta_type
in
self
.
HAS_ARGUMENT_SRC_METATYPE_SET
:
return
method
.
arguments_src
.
split
()
elif
meta_type
in
self
.
HAS_FUNC_CODE_METATYPE_SET
:
try
:
func_code
=
method
.
__code__
except
AttributeError
:
func_code
=
method
.
func_code
return
func_code
.
co_varnames
[:
func_code
.
co_argcount
]
return
method
.
__code__
.
co_varnames
[:
method
.
__code__
.
co_argcount
]
# Note: Raising here would completely prevent indexation from working.
# Instead, let the method actually fail when called, so _catalogObjectList
# can log the error and carry on.
...
...
@@ -1842,10 +1838,7 @@ class Catalog(Folder,
else
:
search_key
=
self
.
getSearchKey
(
key
,
'RelatedKey'
)
else
:
try
:
func_code
=
script
.
__code__
except
AttributeError
:
func_code
=
script
.
func_code
func_code
=
script
.
__code__
search_key
=
(
AdvancedSearchKeyWrapperForScriptableKey
if
(
# 5: search_value (under any name), "search_key", "group",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment