#NEWLINE# def delete_record( self , record ) : #NEWLINE# #INDENT# '\n        Delete a record.\n\n        :param record: Record to delete.\n        :type  record: :class:`Record`\n\n        :rtype: ``bool``\n        ' #NEWLINE# zone_id = record . zone . id #NEWLINE# record_id = record . id #NEWLINE# try : #NEWLINE# #INDENT# self . connection . request ( ( '/zones/%s/records/%s' % ( zone_id , record_id ) ) , method = 'DELETE' ) #NEWLINE# #UNINDENT# except MalformedResponseError : #NEWLINE# #INDENT# e = sys . exc_info ( ) [ 1 ] #NEWLINE# if ( e . body == 'Not found' ) : #NEWLINE# #INDENT# raise RecordDoesNotExistError ( value = "Record doesn't exists" , driver = zone_id , record_id = record_id ) #NEWLINE# #UNINDENT# raise e #NEWLINE# #UNINDENT# return True