Change import statements with try except to enable explicit import of submodules from import to avoid conflicts with parent project.

This commit is contained in:
2025-02-22 17:10:53 +01:00
parent 7906387271
commit 81be6b54c8
10 changed files with 56 additions and 19 deletions

View File

@@ -8,7 +8,10 @@ import json
#from instruments.readers import set_dima_path as configpath
#configpath.set_dima_path()
from utils import g5505_utils
try:
from dima.utils import g5505_utils as utils
except ModuleNotFoundError:
import utils.g5505_utils as utils
def read_jsonflag_as_dict(path_to_file):