Reputation: 291
So - I am trying to get a file from point A to point B. I use the following piece of code:
from scp import SCPClient
try:
scp = SCPClient(ssh_conn.get_transport())
scp.get(X, Y)
scp.close()
Everything was working well until the file grew big enough to raise timeout. Now I can not copy the file to point B anymore because it just times out with the following error:
File "/usr/local/lib/python2.7/dist-packages/scp.py", line 415, in _recv_file
raise SCPException('Error receiving, socket.timeout')
scp.SCPException: Error receiving, socket.timeout
How do I increase the time or get rid of the timeout?
Upvotes: 2
Views: 1891
Reputation: 21
This may help:
scp = SCPClient(ssh_conn.get_transport(), socket_timeout=your_timeout)
Upvotes: 2