Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars committed May 30, 2023
1 parent a072158 commit 50f13ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sshkey_tools/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ def __table__(self) -> tuple:
msg = "No signature"
if self.is_signed and self.private_key is not None:
msg = f"Signed with private key {self.private_key.get_fingerprint()}"

if self.is_signed and self.private_key is None:
msg = "Signed with: See pubkey fingerprint above"

Expand Down
2 changes: 1 addition & 1 deletion src/sshkey_tools/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __init__(
_SERIALIZATION.Encoding.OpenSSH,
_SERIALIZATION.PublicFormat.OpenSSH,
]

# Ensure comment is not None
self.comment = nullsafe_getattr(self, "comment", "")

Expand Down
3 changes: 2 additions & 1 deletion src/sshkey_tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ def nullsafe_getattr(obj, attr: str, default):
att = getattr(obj, attr, default)
if att is None:
att = default

return att


def join_dicts(*dicts) -> dict:
"""
Joins two or more dictionaries together.
Expand Down

0 comments on commit 50f13ce

Please sign in to comment.