Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 authored Oct 28, 2024
1 parent a1ff4f3 commit 789ffc9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spyder/plugins/ipythonconsole/utils/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def tunnel_to_kernel(
client_keys=[sshkey],
**self._split_shh_address(hostname),
)
else:
else:
self.__tunnel_handler = KernelClientTunneler.new_connection(
password=password,
**self._split_shh_address(hostname),
Expand Down Expand Up @@ -135,6 +135,8 @@ def _split_shh_address(address):
"""Split ssh address into host and port."""
user_host, _, port = address.partition(':')
user, _, host = user_host.rpartition('@')
return {'username': user if user else None,
'host': host if host else None,
'port': int(port) if port else None}
return {
'username': user if user else None,
'host': host if host else None,
'port': int(port) if port else None
}

0 comments on commit 789ffc9

Please sign in to comment.