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