From 504e01c606d0c346f0c7334424ef0587db33464f Mon Sep 17 00:00:00 2001 From: bia1708 Date: Fri, 4 Oct 2024 15:10:27 +0300 Subject: [PATCH] __init__.py: Fix import condition Simplify the condition and remove LINUX_DEFAULT_PATH as a requirement. Signed-off-by: bia1708 --- nebula/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nebula/__init__.py b/nebula/__init__.py index a3099f4..4b5b47d 100644 --- a/nebula/__init__.py +++ b/nebula/__init__.py @@ -1,7 +1,7 @@ # from pyfiglet import Figlet # f = Figlet(font="slant") # print(f.renderText("Nebula")) -import os +import platform from nebula.builder import builder from nebula.common import LINUX_DEFAULT_PATH, utils @@ -18,7 +18,7 @@ from nebula.tftpboot import tftpboot from nebula.uart import uart -if os.name in ["nt", "posix"] and os.path.exists(LINUX_DEFAULT_PATH): +if platform.system() == "Linux": from nebula.usbmux import usbmux __version__ = "v1.0.0"