Skip to content

Commit

Permalink
Make it clear to mypy that this driver only works on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Oct 5, 2022
1 parent e0335a8 commit 7cf228b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qcodes_contrib_drivers/drivers/SignalCore/SignalCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ def __init__(self, name: str,
self.connect_message()

def _open(self) -> None:
self._handle = ctypes.wintypes.HANDLE()
if sys.platform == "win32":
self._handle = ctypes.wintypes.HANDLE()
else:
raise EnvironmentError(f"{self.__class__.__name__} is supported only on Windows platform")

self._dll.sc5520a_uhfsOpenDevice(COMMINTERFACE, self.buffer_pointer_array[0], ctypes.c_uint8(1), ctypes.byref(self._handle))

def _close(self) -> None:
Expand Down

0 comments on commit 7cf228b

Please sign in to comment.