Fix shared path
This commit is contained in:
parent
fd798c98aa
commit
5e44904956
@ -8,8 +8,12 @@ import logging
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add the voicebot directory to the path
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
# Add the project root (parent of the voicebot directory) to sys.path so
|
||||
# imports like `from shared import ...` work when running this script from
|
||||
# inside the `voicebot` container.
|
||||
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if project_root not in sys.path:
|
||||
sys.path.append(project_root)
|
||||
|
||||
from shared.logger import logger
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user