Rendere l'output di phicli json #3

Open
blallo wants to merge 4 commits from json-serialize-output into master
Showing only changes of commit 2f2142025f - Show all commits

View File

@ -63,8 +63,10 @@ def adduser(uid):
# Check # Check
user = get_user_by_uid(client, uid) user = get_user_by_uid(client, uid)
print() if not SHOW_PASSWORDS:
print(pp(user)) user.pop("password")
print(JSON_ENC.encode(sanitize(user)))
@cli.register("delete an user", ["user identifier"]) @cli.register("delete an user", ["user identifier"])
@ -89,7 +91,7 @@ def showgroup(cn):
print("Group {} not found".format(gcn)) print("Group {} not found".format(gcn))
return return
print(pp(group)) print(JSON_ENC.encode(sanitize(group)))
@cli.register("list all groups") @cli.register("list all groups")