Skip to content

Commit c026c36

Browse files
committed
Confirmed FreeBSD support
1 parent 47373eb commit c026c36

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cros_ec_python/ioports/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,17 @@
5555
Some classes may have additional methods, such as `cros_ec_python.ioports.x86portio.IoPortIo`.
5656
"""
5757

58-
import os
58+
import sys
5959

60-
if os.name == "posix":
60+
if sys.platform == "linux":
6161
try:
6262
from .x86portio import IoPortIo as PortIO
6363
except ImportError:
6464
from .devportio import DevPortIO as PortIO
65-
elif os.name == "nt":
65+
elif sys.platform == "win32":
6666
from .winportio import WinPortIO as PortIO
67+
elif sys.platform.startswith("freebsd"):
68+
from .freebsdportio import FreeBsdPortIO as PortIO
6769
else:
6870
raise Exception("Unsupported OS")
6971

0 commit comments

Comments
 (0)