clan/secrets: fix if user/machine directory does not contain a key.json
This commit is contained in:
parent
e6762d8b3f
commit
ae3283a762
@ -55,8 +55,9 @@ def ensure_user_or_machine(pub_key: str) -> SopsKey:
|
||||
for folder in folders:
|
||||
if folder.exists():
|
||||
for user in folder.iterdir():
|
||||
if not user.is_dir():
|
||||
if not (user / "key.json").exists():
|
||||
continue
|
||||
|
||||
if read_key(user) == pub_key:
|
||||
key.username = user.name
|
||||
return key
|
||||
|
Loading…
Reference in New Issue
Block a user