Skip to content

Commit 4fb3d70

Browse files
authored
Resolve SIM107 in sshtunnel.py
Resolves SyntaxWarning: 'return' in a 'finally' block
1 parent dc07328 commit 4fb3d70

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sshtunnel.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,13 +1036,13 @@ def _read_ssh_config(ssh_host,
10361036
except (AttributeError, TypeError): # ssh_config_file is None
10371037
if logger:
10381038
logger.info('Skipping loading of ssh configuration file')
1039-
finally:
1040-
return (ssh_host,
1041-
ssh_username or getpass.getuser(),
1042-
ssh_pkey,
1043-
int(ssh_port) if ssh_port else 22, # fallback value
1044-
ssh_proxy,
1045-
compression)
1039+
1040+
return (ssh_host,
1041+
ssh_username or getpass.getuser(),
1042+
ssh_pkey,
1043+
int(ssh_port) if ssh_port else 22, # fallback value
1044+
ssh_proxy,
1045+
compression)
10461046

10471047
@staticmethod
10481048
def get_agent_keys(logger=None):

0 commit comments

Comments
 (0)