fix(keyrinctl): yield file not found errors instead of blocking on stdin

Handle missing or wrong certificate paths in a way that does not lead to
a blocking command by reading from stdin. Instead throw either file not
found errors or expect optional outputs.
This commit is contained in:
Levente Polyak
2021-10-24 15:06:38 +02:00
parent 58307c629d
commit 94c3b4c8e9
2 changed files with 15 additions and 12 deletions

View File

@ -133,15 +133,17 @@ def main() -> None:
)
)
elif "export" == args.subcommand:
print(
export(
working_dir=working_dir,
keyring_root=keyring_root,
sources=args.source,
output=args.output,
),
end="",
result = export(
working_dir=working_dir,
keyring_root=keyring_root,
sources=args.source,
output=args.output,
)
if result:
print(
result,
end="",
)
elif "build" == args.subcommand:
build(
working_dir=working_dir,