Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
52af3703
Commit
52af3703
authored
Jan 26, 2015
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Type.ConnectionPlugin.SFTPConnection: Fix gaierror access.
parent
bb8dc227
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
product/ERP5Type/ConnectionPlugin/SFTPConnection.py
product/ERP5Type/ConnectionPlugin/SFTPConnection.py
+2
-2
No files found.
product/ERP5Type/ConnectionPlugin/SFTPConnection.py
View file @
52af3703
...
...
@@ -29,7 +29,7 @@
import
os
,
socket
from
urlparse
import
urlparse
from
socket
import
error
,
socket
,
getaddrinfo
,
AF_UNSPEC
,
SOCK_STREAM
from
socket
import
gaierror
,
error
,
socket
,
getaddrinfo
,
AF_UNSPEC
,
SOCK_STREAM
from
xmlrpclib
import
Binary
from
cStringIO
import
StringIO
from
paramiko
import
Transport
,
RSAKey
,
SFTPClient
...
...
@@ -93,7 +93,7 @@ class SFTPConnection:
raise
SFTPError
(
"No password or private_key defined"
)
# Connect
self
.
conn
=
SFTPClient
.
from_transport
(
self
.
transport
)
except
(
socket
.
gaierror
,
error
),
msg
:
except
(
gaierror
,
error
),
msg
:
raise
SFTPError
(
str
(
msg
)
+
' while establishing connection to %s'
%
(
self
.
url
,))
# Go to specified directory
try
:
...
...
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