Beispiel #1
0
 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),
            }
Beispiel #2
0
 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),
        }
Beispiel #4
0
 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}
Beispiel #5
0
 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)}
Beispiel #6
0
def dbinit():
    g.persondb = zoodb.person_setup()
    g.transferdb = zoodb.transfer_setup()
    g.balancedb = zoodb.balance_setup()
Beispiel #7
0
def dbinit():
    g.persondb   = zoodb.person_setup()
    g.transferdb = zoodb.transfer_setup()
    g.balancedb = zoodb.balance_setup()