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 c28286a626
commit 821d314cb6
10 changed files with 56 additions and 19 deletions

View File

@ -1,7 +1,12 @@
import subprocess
import os
import utils.g5505_utils as utils
from pipelines.metadata_revision import update_hdf5_file_with_review
try:
from dima.utils import g5505_utils as utils
from dima.pipelines.metadata_revision import update_hdf5_file_with_review
except ModuleNotFoundError:
import utils.g5505_utils as utils
from pipelines.metadata_revision import update_hdf5_file_with_review
def perform_git_operations(hdf5_upload):
status_command = ['git', 'status']