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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
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