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
52ac7372
Commit
52ac7372
authored
Mar 25, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: continue pylint test even if it raises an exception.
parent
49eea47a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.PythonCodeUtils.py
...eItem/portal_components/extension.erp5.PythonCodeUtils.py
+11
-1
No files found.
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.PythonCodeUtils.py
View file @
52ac7372
from
six
import
string_types
as
basestring
import
re
import
json
import
sys
from
zExceptions
import
ExceptionFormatter
from
Products.ERP5Type.Utils
import
checkPythonSourceCode
...
...
@@ -47,7 +49,15 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
else
:
body
=
data
[
'code'
]
try
:
message_list
=
checkPythonSourceCode
(
body
.
encode
(
'utf8'
),
data
.
get
(
'portal_type'
))
except
Exception
:
message_list
=
[{
'type'
:
'E'
,
'row'
:
0
,
'column'
:
0
,
'text'
:
'pylint failed:
\
n
%s'
%
''
.
join
(
ExceptionFormatter
.
format_exception
(
*
sys
.
exc_info
())),
}]
for
message_dict
in
message_list
:
if
is_script
:
message_dict
[
'row'
]
=
message_dict
[
'row'
]
-
4
...
...
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