Skip to content

Commit

Permalink
Warn about -k, --key deprecation in in-toto-run
Browse files Browse the repository at this point in the history
`warnings.warn` is for library code. Here we want to notify the cli
user directly.

Signed-off-by: Lukas Puehringer <[email protected]>
  • Loading branch information
lukpueh committed Nov 21, 2023
1 parent b3bbbb9 commit 99c3f42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions in_toto/in_toto_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ def main():
# case the key is encrypted. Something that should not happen in the lib.
key = None
if args.key:
LOG.warning("'-k', '--key' is deprecated, use '--pkcs8' instead.")

key = interface.import_privatekey_from_file(
args.key,
key_type=args.key_type,
Expand Down

0 comments on commit 99c3f42

Please sign in to comment.