Skip to content

Commit 7033da9

Browse files
author
Lachlan Grose
committed
fix: hide processor import error until its used
1 parent ee86355 commit 7033da9

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

LoopStructural/modelling/__init__.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
try:
2323
from ..modelling.input.project_file import LoopProjectfileProcessor
2424
except (LoopImportError, ImportError):
25-
logger.warning(
26-
"Cannot use LoopProjectfileProcessor: Loop project file cannot be imported, try installing LoopProjectFile"
27-
)
25+
class LoopProjectfileProcessor(ProcessInputData):
26+
"""
27+
Dummy class to handle the case where LoopProjectFile is not installed.
28+
This will raise a warning when used.
29+
"""
30+
31+
def __init__(self, *args, **kwargs):
32+
raise LoopImportError(
33+
"LoopProjectFile cannot be imported. Please install LoopProjectFile."
34+
)
35+

0 commit comments

Comments
 (0)