Skip to content
Snippets Groups Projects
Commit b1b9ba76 authored by mads's avatar mads
Browse files

handle empty password

parent 4625d461
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ class SSHClient(object): ...@@ -41,7 +41,7 @@ class SSHClient(object):
return self.client return self.client
def connect(self): def connect(self):
if self.password is None: if self.password is None or self.password == "":
raise IOError("Password not set") raise IOError("Password not set")
self.client = paramiko.SSHClient() self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment