def create_record(self, type, name, content):
    records = self.list_records(type, name, content)
    if records:
        LOGGER.debug('create_record (ignored, duplicate): %s', records[0]['id'])
        return True
    data = {'type': type, 'name': self._relative_name(name), 'value': content}
    result = self._post('/{0}/records'.format(self.options['domain']), data)
    if (not result['uid']):
        raise Exception('Error occured when inserting the new record.')
    LOGGER.debug('create_record: %s', result['uid'])
    return True
def create_record(self, type, name, content):
    records = self.list_records(type, name, content)
    if records:
        LOGGER.debug('create_record (ignored, duplicate): %s', records[0]['id'])
        return True
    data = {'type': type, 'name': self._relative_name(name), 'value': content}
    result = self._post('/{0}/records'.format(self.options['domain']), data)
    if (not result['uid']):
        raise Exception('Error occured when inserting the new record.')
    LOGGER.debug('create_record: %s', result['uid'])
    return True