Skip to content

Commit

Permalink
throw errors if key_filename is not found (#383)
Browse files Browse the repository at this point in the history
When user provides key_filename and it does not exist, it's expected to
throw an error.

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz authored Oct 20, 2023
1 parent 7b5382e commit 3ba5626
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dpdispatcher/ssh_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def _setup_ssh(self):
pass
if key is not None:
break
else:
raise OSError(f"{key_path} not found!")
elif self.look_for_keys:
for keytype, name in [
(paramiko.RSAKey, "rsa"),
Expand Down

0 comments on commit 3ba5626

Please sign in to comment.