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
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
f4613a3d
Commit
f4613a3d
authored
Apr 21, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dqe: fix python3 compatibility
parent
4a2b5ae6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
bt5/erp5_dqe/DocumentTemplateItem/portal_components/document.erp5.DQEDataValidatorClientConnector.py
...mponents/document.erp5.DQEDataValidatorClientConnector.py
+4
-4
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getSentToDQEValueCaption.py
...l_skins/erp5_dqe/HTTPExchange_getSentToDQEValueCaption.py
+2
-2
No files found.
bt5/erp5_dqe/DocumentTemplateItem/portal_components/document.erp5.DQEDataValidatorClientConnector.py
View file @
f4613a3d
import
requests
from
json
import
loads
from
socket
import
timeout
from
requests
import
ConnectionError
,
Timeout
from
requests
import
ConnectionError
as
_ConnectionError
,
Timeout
from
Products.ERP5Type.XMLObject
import
XMLObject
from
urllib
import
urlencode
from
six.moves
import
urllib
from
zLOG
import
LOG
,
INFO
class
DQEDataValidatorClientConnector
(
XMLObject
):
...
...
@@ -23,7 +23,7 @@ class DQEDataValidatorClientConnector(XMLObject):
try
:
base_url
=
self
.
getServerUrl
()
+
method_name
+
'/'
response
=
requests
.
get
(
base_url
,
params
=
params
,
timeout
=
self
.
getTimeout
())
except
(
Timeout
,
timeout
,
ConnectionError
):
except
(
Timeout
,
timeout
,
_
ConnectionError
):
raw_response
=
'TIMEOUT'
result_dict
=
{}
else
:
...
...
@@ -41,7 +41,7 @@ class DQEDataValidatorClientConnector(XMLObject):
archiveExchange
=
self
.
_getTypeBasedMethod
(
'archiveExchange'
)
if
archiveExchange
is
not
None
:
archiveExchange
(
raw_request
=
base_url
+
'?'
+
urlencode
(
params
),
# XXX is this correct?
raw_request
=
base_url
+
'?'
+
url
lib
.
urlparse
.
url
encode
(
params
),
# XXX is this correct?
raw_response
=
raw_response
,
service
=
service
,
archive_kw
=
archive_kw
,
...
...
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getSentToDQEValueCaption.py
View file @
f4613a3d
import
urlparse
from
six.moves
import
urllib
resource_value
=
context
.
getResourceValue
()
if
not
resource_value
.
isMemberOf
(
'http_exchange_resource/dqe'
):
...
...
@@ -7,7 +7,7 @@ if not resource_value.isMemberOf('http_exchange_resource/dqe'):
request
=
context
.
getRequest
()
if
not
request
:
return
''
query_dict
=
url
parse
.
parse_qs
(
urlparse
.
urlparse
(
request
).
query
)
query_dict
=
url
lib
.
urlparse
.
parse_qs
(
urllib
.
urlparse
.
urlparse
(
request
).
query
)
dqe_resource_category
=
context
.
getPortalObject
().
portal_categories
.
http_exchange_resource
.
dqe
service_value_to_key_list_dict
=
{
dqe_resource_category
.
DefaultEmail
:
(
'Email'
,
),
...
...
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