mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
refactor: 🎨 Replace os.path by pathlib
This commit is contained in:
parent
68bab01fa2
commit
bca20e28f6
1 changed files with 3 additions and 3 deletions
|
@ -40,7 +40,7 @@ from configparser import ConfigParser
|
|||
from re2oapi import Re2oAPIClient
|
||||
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import logging
|
||||
import traceback
|
||||
|
@ -114,10 +114,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')
|
||||
|
|
Loading…
Reference in a new issue