Skip to content

Commit

Permalink
#529: improve error handling for missing vtk module
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Sep 23, 2024
1 parent cf50247 commit 549a311
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lbaf/IO/lbsGridStreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class GridStreamer:

def __init__(
self,
points: vtk.vtkPoints,
lines: vtk.vtkCellArray,
points, # vtk.vtkPoints
lines, # vtk.vtkCellArry
field_arrays: Optional[dict] = None,
point_arrays: Optional[list] = None,
cell_arrays: Optional[list] = None,
Expand All @@ -29,6 +29,9 @@ def __init__(
if cell_arrays is None:
cell_arrays = []

if not using_vtk:
raise ModuleNotFoundError("Could not find vtk module, which is required for the GridStreamer.")

# Assign logger to instance variable
self.__logger = logger

Expand Down

0 comments on commit 549a311

Please sign in to comment.