Skip to content

Commit

Permalink
Prevent NIT to be instantiated on other platforms than linux / windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mmouchous-ledger committed Nov 27, 2024
1 parent 985f8ed commit 91ddbaf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions laserstudio/instruments/instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .pdm import PDMInstrument
from .probe import ProbeInstrument
from typing import Optional, cast, Any
import sys
import logging


Expand Down Expand Up @@ -50,6 +51,10 @@ def __init__(self, config: dict):
camera_config
)
elif device_type == "NIT":
if sys.platform != "linux" and sys.platform != "win32":
raise Exception(
"The NIT camera is not supported on other platforms than Linux or Windows."
)
self.camera: Optional[CameraInstrument] = CameraNITInstrument(
camera_config
)
Expand Down

0 comments on commit 91ddbaf

Please sign in to comment.