'Reads the settings from the rudder.ini file'

def read_settings(self):

    if six.PY2:
        config = configparser.SafeConfigParser()
    else:
        config = configparser.ConfigParser()
    rudder_default_ini_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'rudder.ini')
    rudder_ini_path = os.path.expanduser(os.path.expandvars(os.environ.get('RUDDER_INI_PATH', rudder_default_ini_path)))
    config.read(rudder_ini_path)
    self.token = os.environ.get('RUDDER_API_TOKEN', config.get('rudder', 'token'))
    self.version = os.environ.get('RUDDER_API_VERSION', config.get('rudder', 'version'))
    self.uri = os.environ.get('RUDDER_API_URI', config.get('rudder', 'uri'))
    self.disable_ssl_validation = config.getboolean('rudder', 'disable_ssl_certificate_validation')
    self.group_name = config.get('rudder', 'group_name')
    self.fail_if_name_collision = config.getboolean('rudder', 'fail_if_name_collision')
    self.cache_path = config.get('rudder', 'cache_path')
    self.cache_max_age = config.getint('rudder', 'cache_max_age')
