Also check that the module imports correctly

This commit is contained in:
sliptonic
2022-06-26 14:09:28 -05:00
parent 45b9f2a7aa
commit a84220cd21

View File

@@ -80,13 +80,14 @@ def Startup():
# If camotics is installed and current enough, import the GUI
try:
import camotics
r = subprocess.run(
["camotics", "--version"], capture_output=True, text=True
).stderr.strip()
major, minor, patch = r.split(".")
if int(major) >= 1 and int(minor) >= 2 and int(patch) >= 2:
from PathScripts import PathCamoticsGui
except FileNotFoundError:
except (FileNotFoundError, ModuleNotFoundError):
pass
Processed = True