Skip to content

Commit 5f729fa

Browse files
committed
feat: raise SIError if platform is not Windows
1 parent 261a7d8 commit 5f729fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

protocols/pipe_protocol/pipe_protocol.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import io
2+
import platform
23
import typing
34

45
from common.exceptions import SmartInspectError
@@ -53,6 +54,9 @@ def _load_options(self) -> None:
5354
self._pipe_name = self._get_string_option("pipename", "smartinspect")
5455

5556
def _internal_connect(self) -> None:
57+
if platform.system() != "Windows":
58+
raise SmartInspectError("Pipe Protocol is only supported on Windows")
59+
5660
filename = self._PIPE_NAME_PREFIX + self._pipe_name
5761
try:
5862
self._stream = open(filename, "w+b", buffering=self._BUFFER_SIZE)

0 commit comments

Comments
 (0)