mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-10 01:17:42 +01:00
17 lines
428 B
Python
17 lines
428 B
Python
|
import logging
|
||
|
|
||
|
from core.helper.utils import load_config as load
|
||
|
logger = logging.getLogger(__file__)
|
||
|
logging.basicConfig(level=logging.INFO)
|
||
|
|
||
|
class CBPiExtension():
|
||
|
|
||
|
def load_config(self):
|
||
|
|
||
|
|
||
|
path = os.path.dirname(sys.modules[self.__class__.__module__].__file__)
|
||
|
try:
|
||
|
return load("%s/config.yaml" % path)
|
||
|
except:
|
||
|
logger.warning("Faild to load config %s/config.yaml" % path)
|