8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00
This commit is contained in:
chapeau 2021-05-13 19:31:27 +02:00
parent 1bc5b51439
commit 425d47c52d

View file

@ -35,6 +35,13 @@ https://github.com/FreeRADIUS/freeradius-server/blob/master/src/modules/rlm_pyth
Inspired by Daniel Stan in Crans
"""
from configparser import ConfigParser
from re2oapi import Re2oAPIClient
import sys
from pathlib import Path
import subprocess
import logging
import os
import sys
@ -125,10 +132,10 @@ def instantiate(*_):
"""
logger.info("Instantiation")
path = (os.path.dirname(os.path.abspath(__file__)))
path = Path(__file__).resolve(strict=True).parent
config = ConfigParser()
config.read(path+'/config.ini')
config.read(path / 'config.ini')
api_hostname = config.get('Re2o', 'hostname')
api_password = config.get('Re2o', 'password')