From bfcb0650e673ccf3c5a35719a19d1c0be9d9c72f Mon Sep 17 00:00:00 2001 From: Martysh12 <49569238+Martysh12@users.noreply.github.com> Date: Sun, 19 Dec 2021 20:29:38 +0200 Subject: [PATCH] Changed os.name to platform.system() Changed os.name to platform.system() because platform.system() is much more reliable, and is easy to check for different system. Also added a check for linux. --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index cff6b9c..9234962 100644 --- a/main.py +++ b/main.py @@ -1,12 +1,14 @@ #!/usr/bin/env python3 """Main asteroid-automator script.""" -import os +import platform -import pyautogui +PLATFORM_SYS = platform.system() -if os.name == "windows": +if PLATFORM_SYS == "Windows": import d3dshot +elif PLATFORM_SYS == "Linux": + import pyautogui class AutomatableGame: