Log the error when parsing a file in `~/.ssh` fails. (#1410)

This should help debugging #1304.

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
This commit is contained in:
yfprojects 2022-08-27 19:51:31 +00:00 committed by GitHub
parent 4e06b6df5a
commit 62ba92a0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -209,6 +209,9 @@ def get_private_keys():
PermissionError,
NotImplementedError,
):
logger.debug(
f'Expected error parsing file in .ssh: {key} (You can safely ignore this)', exc_info=True
)
continue
except OSError as e:
if e.errno == errno.ENXIO: