mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2025-01-18 17:10:47 +00:00
should the loader attempt to load an invalid toml config
log as error but allow the loader to continue patch bump
This commit is contained in:
parent
bf77ded007
commit
6b79c091e8
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "voicemeeter-api"
|
name = "voicemeeter-api"
|
||||||
version = "2.3.6"
|
version = "2.3.7"
|
||||||
description = "A Python wrapper for the Voiceemeter API"
|
description = "A Python wrapper for the Voiceemeter API"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -147,8 +147,13 @@ class Loader(metaclass=SingletonType):
|
|||||||
self.logger.info(
|
self.logger.info(
|
||||||
f"config file with name {identifier} already in memory, skipping.."
|
f"config file with name {identifier} already in memory, skipping.."
|
||||||
)
|
)
|
||||||
return False
|
return
|
||||||
|
try:
|
||||||
self.parser = dataextraction_factory(data)
|
self.parser = dataextraction_factory(data)
|
||||||
|
except tomllib.TOMLDecodeError as e:
|
||||||
|
ERR_MSG = (str(e), f"When attempting to load {identifier}.toml")
|
||||||
|
self.logger.error(f"{type(e).__name__}: {' '.join(ERR_MSG)}")
|
||||||
|
return
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def register(self, identifier, data=None):
|
def register(self, identifier, data=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user