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:
parent
b5c4bbcdd9
commit
bfcb0650e6
8
main.py
8
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:
|
||||
|
|
Loading…
Reference in New Issue