def rpc_get_user_info(self, username): person_db = zoodb.person_setup() p = person_db.query(zoodb.Person).get(username) if not p: return None return { 'username': p.username, 'profile': p.profile, 'zoobars': bank_client.balance(username), }
def rpc_get_user_info(self, username): person_db = zoodb.person_setup() p = person_db.query(zoodb.Person).get(username) if not p: return None return { 'username': p.username, 'profile': p.profile, 'zoobars': bank.balance(username), }
def rpc_get_user_info(self, username): person_db = zoodb.person_setup() p = person_db.query(zoodb.Person).get(username) #print("[get_user_info] UID: ", os.getresuid(), "GID: ", os.getresgid()) if not p: return None return { 'username': p.username, 'profile': p.profile, 'zoobars': bank.balance(username), }
def pypy_get_user(self, username): log(username) person_db = zoodb.person_setup() balance_db = zoodb.balance_setup() p = person_db.query(zoodb.Person).get(username) balance = balance_db.query(zoodb.Balance).get(username) log("user is: %s zoobars is: %d"%(username, balance.zoobars)) if not p: return None return {'username': p.username, 'profile': p.profile, 'zoobars': balance.zoobars}
def rpc_get_user_info(self, username): person_db = zoodb.person_setup() p = person_db.query(zoodb.Person).get(username) if not p: return None return {"username": p.username, "profile": p.profile, "zoobars": bank_client.balance(username)}
def dbinit(): g.persondb = zoodb.person_setup() g.transferdb = zoodb.transfer_setup() g.balancedb = zoodb.balance_setup()