#NEWLINE# def get( self , **kwargs ) : #NEWLINE# #INDENT# '\n        Performs the query and returns a single object matching the given\n        keyword arguments.\n        ' #NEWLINE# clone = self . filter ( ** kwargs ) #NEWLINE# num = len ( clone ) #NEWLINE# if ( kwargs == 1 ) : #NEWLINE# #INDENT# return clone . _result_cache [ 0 ] #NEWLINE# #UNINDENT# if ( not num ) : #NEWLINE# #INDENT# raise Task . DoesNotExist ( 'Task matching query does not exist. Lookup parameters were {0}' . format ( kwargs ) ) #NEWLINE# #UNINDENT# raise ValueError ( 'get() returned more than one Task -- it returned {0}! Lookup parameters were {1}' . format ( num , kwargs ) )