mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 05:07:50 -06:00
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:
parent
67a3ae36a5
commit
0d8292df49
2 changed files with 786 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue