[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 02/02: cli
From: |
gnunet |
Subject: |
[libeufin] 02/02: cli |
Date: |
Tue, 26 Jan 2021 17:19:27 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 91748a2896b993d1d24f0e6a23f202d390fac935
Author: MS <ms@taler.net>
AuthorDate: Tue Jan 26 17:19:04 2021 +0100
cli
---
cli/bin/libeufin-cli | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index 10ca2f4..86b51d4 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")
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.