We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47373eb commit c026c36Copy full SHA for c026c36
cros_ec_python/ioports/__init__.py
@@ -55,15 +55,17 @@
55
Some classes may have additional methods, such as `cros_ec_python.ioports.x86portio.IoPortIo`.
56
"""
57
58
-import os
+import sys
59
60
-if os.name == "posix":
+if sys.platform == "linux":
61
try:
62
from .x86portio import IoPortIo as PortIO
63
except ImportError:
64
from .devportio import DevPortIO as PortIO
65
-elif os.name == "nt":
+elif sys.platform == "win32":
66
from .winportio import WinPortIO as PortIO
67
+elif sys.platform.startswith("freebsd"):
68
+ from .freebsdportio import FreeBsdPortIO as PortIO
69
else:
70
raise Exception("Unsupported OS")
71
0 commit comments