Skip to content

Commit

Permalink
added timeout to ssh connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamek committed Jul 13, 2014
1 parent 3da86e9 commit 8eb0ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git_deploy/classes/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, host, user, root = '/', port = 22, password = None):
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

try:
self.ssh.connect(host, port, user, password)
self.ssh.connect(host, port, user, password, None, None, 10)
except (paramiko.SSHException, socket.error):
raise Exception('Failed to connect to server!')

Expand Down

0 comments on commit 8eb0ddb

Please sign in to comment.