Skip to content
Snippets Groups Projects
Commit a2ebc031 authored by Moul's avatar Moul
Browse files

[fix] Partial revert of previous revocation changes

To be compatible with mypy, pylint, pytest
Returning in case of dry-run
Not returning a value since mypy and pylint complain
that every parts of the functions should return an integer
parent 193ec8df
No related branches found
No related tags found
1 merge request!215#292: Introduce pylint
......@@ -54,6 +54,7 @@ def save(ctx: click.Context, file: str) -> None:
if ctx.obj["DRY_RUN"]:
click.echo(rev_doc.signed_raw())
return
idty_table = idty_tools.display_identity(rev_doc.identity)
click.echo(idty_table.draw())
......@@ -85,6 +86,7 @@ def revoke_now(ctx: click.Context) -> None:
if ctx.obj["DRY_RUN"]:
click.echo(rev_doc.signed_raw())
return
idty_table = idty_tools.display_identity(rev_doc.identity)
click.echo(idty_table.draw())
......@@ -110,6 +112,7 @@ def verify(ctx: click.Context, file: str) -> None:
if ctx.obj["DRY_RUN"]:
click.echo(rev_doc.signed_raw())
return
idty_table = idty_tools.display_identity(rev_doc.identity)
click.echo(idty_table.draw())
......@@ -136,6 +139,7 @@ def publish(ctx: click.Context, file: str) -> None:
rev_doc = verify_document(file)
if ctx.obj["DRY_RUN"]:
click.echo(rev_doc.signed_raw())
return
idty_table = idty_tools.display_identity(rev_doc.identity)
click.echo(idty_table.draw())
......
......@@ -367,9 +367,10 @@ def test_revocation_cli_save(display, dry_run, file, user_input, expected, monke
"",
[
"Version: 10",
],
[
"Revocation document is valid.\n",
],
[],
),
(
False,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment