Permalink
Browse files

Make num_retries a parameter when connecting to SSH server.

  • Loading branch information...
1 parent a8a5fbd commit 3ade929cc52280c69f284323e2489537b918ed9d @garnaat garnaat committed Dec 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 boto/manage/cmdshell.py
View
@@ -46,9 +46,9 @@ def __init__(self, server,
self._ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.connect()
- def connect(self):
+ def connect(self, num_retries=5):
retry = 0
- while retry < 5:
+ while retry < num_retries:
try:
self._ssh_client.connect(self.server.hostname,
username=self.uname,

0 comments on commit 3ade929

Please sign in to comment.