Skip to content

Commit 8469849

Browse files
committed
fix mypy
1 parent ffa3a9b commit 8469849

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

libvirtnbdbackup/ssh/client.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,13 @@ def connect(self) -> SSHClient:
7373
cli = SSHClient()
7474
cli.load_system_host_keys()
7575
cli.set_missing_host_key_policy(AutoAddPolicy())
76-
connect_kwargs = {
77-
"hostname": self.host,
78-
"username": self.user,
79-
"port": self.port,
80-
"timeout": 5000,
81-
}
82-
if self.key_filename:
83-
connect_kwargs["key_filename"] = self.key_filename
84-
cli.connect(**connect_kwargs)
76+
cli.connect(
77+
hostname=self.host,
78+
username=self.user,
79+
port=self.port,
80+
timeout=5000,
81+
key_filename=self.key_filename,
82+
)
8583
return cli
8684
except AuthenticationException as e:
8785
raise exceptions.sshError(f"SSH key authentication failed: {e}")

0 commit comments

Comments
 (0)