diff options
author | MS <ms@taler.net> | 2021-01-26 17:19:04 +0100 |
---|---|---|
committer | MS <ms@taler.net> | 2021-01-26 17:19:04 +0100 |
commit | 91748a2896b993d1d24f0e6a23f202d390fac935 (patch) | |
tree | cb48f919e0719ebcae9444dc221ecbfc74e085c4 /cli | |
parent | 58181b7702db1d082e772d85197a36c1fd6bf706 (diff) | |
download | libeufin-91748a2896b993d1d24f0e6a23f202d390fac935.tar.gz libeufin-91748a2896b993d1d24f0e6a23f202d390fac935.tar.bz2 libeufin-91748a2896b993d1d24f0e6a23f202d390fac935.zip |
cli
Diffstat (limited to 'cli')
-rwxr-xr-x | cli/bin/libeufin-cli | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli index 10ca2f46..86b51d40 100755 --- a/cli/bin/libeufin-cli +++ b/cli/bin/libeufin-cli @@ -13,10 +13,11 @@ from getpass import getpass def tell_user(resp, withsuccess=False): - if resp.status_code == 200 and not withsuccess: + if resp.status_code != 200: + print(resp.content.decode("utf-8")) return - print(resp.content.decode("utf-8")) - + if withsuccess: + print(resp.content.decode("utf-8")) # FIXME: deprecate this in favor of NexusContext def fetch_env(): @@ -83,8 +84,7 @@ def list_users(obj): print("Could not reach nexus at " + url) exit(1) - print(resp.content.decode("utf-8")) - + tell_user(resp, withsuccess=True) @users.command(help="Change user's password") @click.option( @@ -109,7 +109,7 @@ def change_password(obj, new_password): print("Could not reach nexus at " + url) exit(1) - tell_user(resp) + tell_user(resp, withsuccess=True) @users.command("create", help="Create a new user") |