mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
9d73f6a7c0
Fix the error: > TypeError: string indices must be integers Caused by `print "{0}".format("\n".join(i["username"] for i in userlist))` `userlist` is a dictionary with {account :{dictionary of parameters}} so I use values() to return the dictionary of parameters.
3 lines
144 B
Python
3 lines
144 B
Python
import sys, json
|
|
userlist=json.loads(sys.stdin.readlines()[0])["users"]
|
|
print "{0}".format("\n".join(i["username"] for i in userlist.values()))
|