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.
This commit is contained in:
Martysh12 2021-12-19 20:29:38 +02:00
parent b5c4bbcdd9
commit bfcb0650e6
1 changed files with 5 additions and 3 deletions

View File

@ -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: