summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-01-26 17:19:04 +0100
committerMS <ms@taler.net>2021-01-26 17:19:04 +0100
commit91748a2896b993d1d24f0e6a23f202d390fac935 (patch)
treecb48f919e0719ebcae9444dc221ecbfc74e085c4 /cli
parent58181b7702db1d082e772d85197a36c1fd6bf706 (diff)
downloadlibeufin-91748a2896b993d1d24f0e6a23f202d390fac935.tar.gz
libeufin-91748a2896b993d1d24f0e6a23f202d390fac935.tar.bz2
libeufin-91748a2896b993d1d24f0e6a23f202d390fac935.zip
cli
Diffstat (limited to 'cli')
-rwxr-xr-xcli/bin/libeufin-cli12
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")