#NEWLINE# def getUser( account , fromObject = True ) : #NEWLINE# #INDENT# if ( not fromObject ) : #NEWLINE# #INDENT# account = users . User ( account ) #NEWLINE# #UNINDENT# user = memcache . get ( 'user_%s_data' , account . user_id ( ) ) #NEWLINE# if ( user == None ) : #NEWLINE# #INDENT# user = UserData . all ( ) . filter ( 'user =' , account ) . get ( ) #NEWLINE# if ( user == None ) : #NEWLINE# #INDENT# raise UserDoesNotExistError ( user ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# memcache . set ( ( 'user_%s_data' % account . user_id ( ) ) , user ) #NEWLINE# #UNINDENT# #UNINDENT# return user