From 13677cb720f1c6123508fbc882368230a421aa89 Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Wed, 4 Jun 2025 11:21:33 +0200 Subject: [PATCH] Remove os.name in favor of platform.system() --- lerobot/find_port.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/find_port.py b/lerobot/find_port.py index 05d0eb8fd..cf0282507 100644 --- a/lerobot/find_port.py +++ b/lerobot/find_port.py @@ -22,7 +22,7 @@ python -m lerobot.find_port ``` """ -import os +import platform import time from pathlib import Path @@ -30,7 +30,7 @@ from pathlib import Path def find_available_ports(): from serial.tools import list_ports # Part of pyserial library - if os.name == "nt": # Windows + if platform.system() == "Windows": # List COM ports using pyserial ports = [port.device for port in list_ports.comports()] else: # Linux/macOS