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
137
Merge Requests
137
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
aec99451
Commit
aec99451
authored
2 years ago
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
1 year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_service: Make code compatible with both python2 and python3.
parent
ec652b5b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
bt5/erp5_web_service/ModuleComponentTemplateItem/portal_components/module.erp5.SFTPConnection.py
...plateItem/portal_components/module.erp5.SFTPConnection.py
+3
-3
bt5/erp5_web_service/ModuleComponentTemplateItem/portal_components/module.erp5.XMLRPCConnection.py
...ateItem/portal_components/module.erp5.XMLRPCConnection.py
+3
-3
bt5/erp5_web_service/ToolComponentTemplateItem/portal_components/tool.erp5.WebServiceTool.py
...emplateItem/portal_components/tool.erp5.WebServiceTool.py
+2
-1
No files found.
bt5/erp5_web_service/ModuleComponentTemplateItem/portal_components/module.erp5.SFTPConnection.py
View file @
aec99451
...
...
@@ -29,10 +29,10 @@
import
os
,
socket
import
operator
from
url
parse
import
urlparse
from
six.moves.urllib.
parse
import
urlparse
from
socket
import
gaierror
,
error
,
socket
,
getaddrinfo
,
AF_UNSPEC
,
SOCK_STREAM
from
xmlrpclib
import
Binary
from
cStringIO
import
StringIO
from
six.moves.xmlrpc_client
import
Binary
from
six.moves
import
cStringIO
as
StringIO
from
paramiko
import
Transport
,
RSAKey
,
SFTPClient
from
paramiko.util
import
retry_on_signal
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_web_service/ModuleComponentTemplateItem/portal_components/module.erp5.XMLRPCConnection.py
View file @
aec99451
...
...
@@ -26,8 +26,8 @@
#
##############################################################################
import
xmlrpclib
from
url
parse
import
urlparse
from
six.moves.xmlrpc_client
import
ServerProxy
from
six.moves.urllib.
parse
import
urlparse
class
XMLRPCConnection
:
"""
...
...
@@ -47,4 +47,4 @@ class XMLRPCConnection:
schema
=
urlparse
(
url
)
url
=
'%s://%s:%s@%s%s'
%
(
schema
[
0
],
self
.
_user_name
,
self
.
_password
,
schema
[
1
],
schema
[
2
])
return
xmlrpclib
.
ServerProxy
(
url
,
allow_none
=
1
)
return
ServerProxy
(
url
,
allow_none
=
1
)
This diff is collapsed.
Click to expand it.
bt5/erp5_web_service/ToolComponentTemplateItem/portal_components/tool.erp5.WebServiceTool.py
View file @
aec99451
...
...
@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type
import
Permissions
import
six
class
ConnectionError
(
Exception
):
pass
...
...
@@ -55,7 +56,7 @@ handler_module_dict = {
'sql'
:
"SQLConnection"
,
'document'
:
"DocumentConnection"
,
}
for
handler_id
,
module_id
in
handler_module_dict
.
iteritems
(
):
for
handler_id
,
module_id
in
six
.
iteritems
(
handler_module_dict
):
# Ignore non-functionnal plugins.
# This is done to avoid adding strict dependencies.
# Code relying on the presence of a plugin will fail upon
...
...
This diff is collapsed.
Click to expand it.
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