Using platform.system() for Windows detection

This is just cosmetics. It works the same as system.platform, but looks
better. Additionally "win32" might be misleading, as it sounds like we
are checking for Windows 32bit here.
This commit is contained in:
Thomas Karl Pietrowski 2016-06-11 12:50:28 +02:00
parent 67a3ae36a5
commit 0d8292df49
2 changed files with 786 additions and 1 deletions

View file

@ -4,6 +4,7 @@
# Cura is released under the terms of the AGPLv3 or higher.
import os
import platform
import sys
#WORKAROUND: GITHUB-704 GITHUB-708
@ -35,7 +36,7 @@ sys.excepthook = exceptHook
import Arcus #@UnusedImport
import cura.CuraApplication
if sys.platform == "win32" and hasattr(sys, "frozen"):
if platform.system() == "Windows" 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")