#NEWLINE# def get( self , prefix , key , cb ) : #NEWLINE# #INDENT# ' Get value for key: prefix+key, first look in localstore\n        ' #NEWLINE# if ( not cb ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( ( prefix + key ) in self . localstore ) : #NEWLINE# #INDENT# value = self . localstore [ ( prefix + key ) ] #NEWLINE# if value : #NEWLINE# #INDENT# value = self . coder . decode ( value ) #NEWLINE# #UNINDENT# async . DelayedCall ( 0 , cb , key = key , value = value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . storage . get ( key = ( prefix + key ) , cb = CalvinCB ( func = self . get_cb , org_cb = cb , org_key = key ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# _log . error ( ( 'Failed to get: %s' % key ) ) #NEWLINE# async . DelayedCall ( 0 , cb , key = key , value = False )