'Store the raw data as our configuration.'

def SaveData(self, raw_data):

    if (self.filename is None):
        raise IOError('Unknown    filename')
    logging.info('Writing    back    configuration    to    file    %s', self.filename)
    try:
        os.makedirs(os.path.dirname(self.filename))
    except (IOError, OSError):
        pass
    try:
        mode = ((os.O_WRONLY | os.O_CREAT) | os.O_TRUNC)
        fd = os.open(self.filename, mode, 384)
        with os.fdopen(fd, 'wb') as config_file:
            self.SaveDataToFD(raw_data, config_file)
    except OSError as e:
        logging.warn('Unable    to    write    config    file    %s:    %s.', self.filename, e)
