original_docstring: Makes sure that the config has the vars loaded and set in the module.
docstring: Makes sure that the config has the vars loaded and set in the module.
docstring_tokens: Makes sure that the config has the vars loaded and set in the module .
code: def ValidateAndSetConfig(_config):
    """Makes sure that the config has the vars loaded and set in the module."""
    # Explicitly set the config path
    setattr(sys.modules[__name__], 'configSource', _config.configSource)
  
    CONFIGVARS = REQUIRED_VARS + OPTIONAL_VARS
    for var in CONFIGVARS:
      empty_value = False
      if not hasattr(_config, var):
        if var in OPTIONAL_VARS:
          log.debug(
              'Setting non-existent but optional config variable {0:s} to '
              'None'.format(var))
          empty_value = True
        else:
          raise TurbiniaException(
              'Required config attribute {0:s}:{1:s} not in config'.format(
                  _config.configSource, var))
      if var in REQUIRED_VARS and getattr(_config, var) is None:
        raise TurbiniaException(
            'Config attribute {0:s}:{1:s} is not set'.format(
                _config.configSource, var))
  
      # Set the attribute in the current module
      if empty_value:
        setattr(sys.modules[__name__], var, None)
      else:
        setattr(sys.modules[__name__], var, getattr(_config, var))
code_tokens: def ValidateAndSetConfig ( _config ) : setattr ( sys . modules [ __name__ ] , 'configSource' , _config . configSource ) CONFIGVARS = REQUIRED_VARS + OPTIONAL_VARS for var in CONFIGVARS : empty_value = False if not hasattr ( _config , var ) : if var in OPTIONAL_VARS : log . debug ( 'Setting non-existent but optional config variable {0:s} to ' 'None' . format ( var ) ) empty_value = True else : raise TurbiniaException ( 'Required config attribute {0:s}:{1:s} not in config' . format ( _config . configSource , var ) ) if var in REQUIRED_VARS and getattr ( _config , var ) is None : raise TurbiniaException ( 'Config attribute {0:s}:{1:s} is not set' . format ( _config . configSource , var ) ) if empty_value : setattr ( sys . modules [ __name__ ] , var , None ) else : setattr ( sys . modules [ __name__ ] , var , getattr ( _config , var ) )
short_docstring: Makes sure that the config has the vars loaded and set in the module.
short_docstring_tokens: Makes sure that the config has the vars loaded and set in the module .
comment: """Makes sure that the config has the vars loaded and set in the module."""$SEP$# Explicitly set the config path$SEP$# Set the attribute in the current module