Commit 3c20ef93 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_service: add ftp timeout

parent 86882101
......@@ -62,7 +62,7 @@ class FTPConnection:
else:
raise FTPError('Not a valid ftp url %s, type is %s' %(self.url, schema.scheme))
try:
self.ftp.connect(hostname, port)
self.ftp.connect(hostname, port, timeout=60*5)
self.ftp.login(self.user_name, self.password)
except Exception as msg:
raise FTPError(str(msg) + ' while establishing connection to %s' % (self.url,))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment