This commit is contained in:
Oscar Krause 2024-11-15 06:33:45 +01:00
parent 36094276ea
commit 9926f8248e

View File

@ -46,9 +46,10 @@ class NV:
self.log = logging.getLogger(self.__class__.__name__) self.log = logging.getLogger(self.__class__.__name__)
if NV.__DRIVER_MATRIX is None: if NV.__DRIVER_MATRIX is None:
from os.path import join, dirname
from json import load as json_load from json import load as json_load
try: try:
file = open(NV.__DRIVER_MATRIX_FILENAME) file = open(join(dirname(__file__), NV.__DRIVER_MATRIX_FILENAME))
NV.__DRIVER_MATRIX = json_load(file) NV.__DRIVER_MATRIX = json_load(file)
file.close() file.close()
self.log.debug(f'Successfully loaded "{NV.__DRIVER_MATRIX_FILENAME}".') self.log.debug(f'Successfully loaded "{NV.__DRIVER_MATRIX_FILENAME}".')