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
Levin Zimmermann
erp5
Commits
50b82a23
Commit
50b82a23
authored
Oct 02, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_service: Make code compatible with both python2 and python3.
parent
948603df
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 @
50b82a23
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
import
os
,
socket
import
os
,
socket
import
operator
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
socket
import
gaierror
,
error
,
socket
,
getaddrinfo
,
AF_UNSPEC
,
SOCK_STREAM
from
xmlrpclib
import
Binary
from
six.moves.xmlrpc_client
import
Binary
from
cStringIO
import
StringIO
from
six.moves
import
cStringIO
as
StringIO
from
paramiko
import
Transport
,
RSAKey
,
SFTPClient
from
paramiko
import
Transport
,
RSAKey
,
SFTPClient
from
paramiko.util
import
retry_on_signal
from
paramiko.util
import
retry_on_signal
...
...
bt5/erp5_web_service/ModuleComponentTemplateItem/portal_components/module.erp5.XMLRPCConnection.py
View file @
50b82a23
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
#
#
##############################################################################
##############################################################################
import
xmlrpclib
from
six.moves.xmlrpc_client
import
ServerProxy
from
url
parse
import
urlparse
from
six.moves.urllib.
parse
import
urlparse
class
XMLRPCConnection
:
class
XMLRPCConnection
:
"""
"""
...
@@ -47,4 +47,4 @@ class XMLRPCConnection:
...
@@ -47,4 +47,4 @@ class XMLRPCConnection:
schema
=
urlparse
(
url
)
schema
=
urlparse
(
url
)
url
=
'%s://%s:%s@%s%s'
%
(
schema
[
0
],
self
.
_user_name
,
self
.
_password
,
url
=
'%s://%s:%s@%s%s'
%
(
schema
[
0
],
self
.
_user_name
,
self
.
_password
,
schema
[
1
],
schema
[
2
])
schema
[
1
],
schema
[
2
])
return
xmlrpclib
.
ServerProxy
(
url
,
allow_none
=
1
)
return
ServerProxy
(
url
,
allow_none
=
1
)
bt5/erp5_web_service/ToolComponentTemplateItem/portal_components/tool.erp5.WebServiceTool.py
View file @
50b82a23
...
@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
...
@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
import
six
class
ConnectionError
(
Exception
):
class
ConnectionError
(
Exception
):
pass
pass
...
@@ -55,7 +56,7 @@ handler_module_dict = {
...
@@ -55,7 +56,7 @@ handler_module_dict = {
'sql'
:
"SQLConnection"
,
'sql'
:
"SQLConnection"
,
'document'
:
"DocumentConnection"
,
'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.
# Ignore non-functionnal plugins.
# This is done to avoid adding strict dependencies.
# This is done to avoid adding strict dependencies.
# Code relying on the presence of a plugin will fail upon
# Code relying on the presence of a plugin will fail upon
...
...
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