Skip to content

Commit

Permalink
Make sure host clients dict has key for host when running command
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed Feb 26, 2016
1 parent 6603c13 commit de75c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pssh/pssh_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def exec_command(self, *args, **kwargs):

def _exec_command(self, host, *args, **kwargs):
"""Make SSHClient, run command on host"""
if not self.host_clients[host]:
if not host in self.host_clients or not self.host_clients[host]:
self.host_clients[host] = SSHClient(host, user=self.user,
password=self.password,
port=self.port, pkey=self.pkey,
Expand Down

0 comments on commit de75c7b

Please sign in to comment.