File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ Features
55--------
66* Allow history file location to be configured.
77
8+
89Bug Fixes
910--------
1011* Respect ` --logfile ` when using ` --execute ` or standard input at the shell CLI.
12+ * Gracefully catch Paramiko parsing errors on ` --list-ssh-config ` .
1113
1214
13151.44.2 (2026/01/13)
Original file line number Diff line number Diff line change @@ -1644,12 +1644,17 @@ def cli(
16441644 sys .exit (0 )
16451645 if list_ssh_config :
16461646 ssh_config = read_ssh_config (ssh_config_path )
1647- for host in ssh_config .get_hostnames ():
1647+ try :
1648+ host_entries = ssh_config .get_hostnames ()
1649+ except KeyError :
1650+ click .secho ('Error reading ssh config' , err = True , fg = "red" )
1651+ sys .exit (1 )
1652+ for host_entry in host_entries :
16481653 if verbose :
1649- host_config = ssh_config .lookup (host )
1650- click .secho (f"{ host } : { host_config .get ('hostname' )} " )
1654+ host_config = ssh_config .lookup (host_entry )
1655+ click .secho (f"{ host_entry } : { host_config .get ('hostname' )} " )
16511656 else :
1652- click .secho (host )
1657+ click .secho (host_entry )
16531658 sys .exit (0 )
16541659 # Choose which ever one has a valid value.
16551660 database = dbname or database
You can’t perform that action at this time.
0 commit comments