'Reads the settings from the consul_io.ini file (or consul.ini for backwards compatibility)'

def read_settings(self):

    config = configparser.SafeConfigParser()
    if os.path.isfile((os.path.dirname(os.path.realpath(__file__)) + '/consul_io.ini')):
        config.read((os.path.dirname(os.path.realpath(__file__)) + '/consul_io.ini'))
    else:
        config.read((os.path.dirname(os.path.realpath(__file__)) + '/consul.ini'))
    config_options = ['host', 'token', 'datacenter', 'servers_suffix', 'tags', 'kv_metadata', 'kv_groups', 'availability', 'unavailable_suffix', 'available_suffix', 'url', 'domain']
    for option in config_options:
        value = None
        if config.has_option('consul', option):
            value = config.get('consul', option)
        setattr(self, option, value)
