From 68a5d8e65e89f29349f91fb0645068f7675a7f10 Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Thu, 16 May 2024 00:28:02 +0800 Subject: [PATCH] mac: add os_is_mac --- automon/__init__.py | 3 ++- automon/integrations/__init__.py | 1 + automon/integrations/mac/__init__.py | 1 + automon/integrations/mac/check.py | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 automon/integrations/mac/check.py diff --git a/automon/__init__.py b/automon/__init__.py index 8335aa8e..21952c96 100755 --- a/automon/__init__.py +++ b/automon/__init__.py @@ -1,2 +1,3 @@ from .helpers import * -from .log import Logging +from .log import Logging, logging +from .integrations import os_is_mac diff --git a/automon/integrations/__init__.py b/automon/integrations/__init__.py index e69de29b..b35cde89 100755 --- a/automon/integrations/__init__.py +++ b/automon/integrations/__init__.py @@ -0,0 +1 @@ +from .mac import os_is_mac diff --git a/automon/integrations/mac/__init__.py b/automon/integrations/mac/__init__.py index c8e91b64..8a2ea4c2 100755 --- a/automon/integrations/mac/__init__.py +++ b/automon/integrations/mac/__init__.py @@ -1,2 +1,3 @@ from .airport import Airport from .macchanger import MacChanger +from .check import os_is_mac diff --git a/automon/integrations/mac/check.py b/automon/integrations/mac/check.py new file mode 100644 index 00000000..108b6d1b --- /dev/null +++ b/automon/integrations/mac/check.py @@ -0,0 +1,7 @@ +import sys + + +def os_is_mac(): + if sys.platform == 'darwin': + return True + return False