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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
af919f68
Commit
af919f68
authored
Oct 14, 2020
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_dqe: Return empty dict in timeout or failure
anyway, what happened is stored in the HTTP Exchange
parent
eb353856
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
bt5/erp5_dqe/DocumentTemplateItem/portal_components/document.erp5.DQEDataValidatorClientConnector.py
...mponents/document.erp5.DQEDataValidatorClientConnector.py
+2
-5
No files found.
bt5/erp5_dqe/DocumentTemplateItem/portal_components/document.erp5.DQEDataValidatorClientConnector.py
View file @
af919f68
...
...
@@ -15,9 +15,6 @@ class DQEDataValidatorClientConnector(XMLObject):
params
=
None
,
archive_kw
=
None
,
):
TIMEOUT
=
-
1
FAILURE
=
-
2
if
params
is
None
:
params
=
{}
params
[
'Licence'
]
=
self
.
getLicenseNumber
()
...
...
@@ -28,7 +25,7 @@ class DQEDataValidatorClientConnector(XMLObject):
response
=
requests
.
get
(
base_url
,
params
=
params
,
timeout
=
self
.
getTimeout
())
except
(
Timeout
,
timeout
,
ConnectionError
):
raw_response
=
'TIMEOUT'
result_dict
=
{
'1'
:
{
self
.
getPortalObject
().
Base_getDQEServiceToErrorKeyDict
().
get
(
service
):
TIMEOUT
}
}
result_dict
=
{}
else
:
if
response
.
ok
:
raw_response
=
response
.
content
...
...
@@ -39,7 +36,7 @@ class DQEDataValidatorClientConnector(XMLObject):
'DQEDataValidatorClientConnector returns Non-ok response : %s'
%
response
.
text
)
raw_response
=
response
.
text
result_dict
=
{
'1'
:
{
self
.
getPortalObject
().
Base_getDQEServiceToErrorKeyDict
().
get
(
service
):
FAILURE
}
}
result_dict
=
{}
finally
:
archiveExchange
=
self
.
_getTypeBasedMethod
(
'archiveExchange'
)
if
archiveExchange
is
not
None
:
...
...
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