From f11ef0c0c06a9b599566304964b4c2e7afbca959 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 11 Jun 2016 13:42:09 +0200 Subject: [PATCH] Using UM.Platform for Windows detection The diff says everything. --- cura_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura_app.py b/cura_app.py index 4f61ef415d..6b9f006d95 100755 --- a/cura_app.py +++ b/cura_app.py @@ -4,7 +4,6 @@ # Cura is released under the terms of the AGPLv3 or higher. import os -import platform import sys #WORKAROUND: GITHUB-704 GITHUB-708 @@ -34,9 +33,10 @@ sys.excepthook = exceptHook # first seems to prevent Sip from going into a state where it # tries to create PyQt objects on a non-main thread. import Arcus #@UnusedImport +from UM.Platform import Platform import cura.CuraApplication -if platform.system() == "Windows" and hasattr(sys, "frozen"): +if Platform.isWindows() and hasattr(sys, "frozen"): dirpath = os.path.expanduser("~/AppData/Local/cura/") os.makedirs(dirpath, exist_ok = True) sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")