From b047db36fdd750384c81b51ed864e1055c7d1c00 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 11 Jun 2016 13:43:50 +0200 Subject: [PATCH] Using isLinux() for Linux detection Of course there are more places where we can replace these checks. --- cura/CuraApplication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 15c41f9c56..7431feed00 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -14,6 +14,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Mesh.ReadMeshJob import ReadMeshJob from UM.Logger import Logger from UM.Preferences import Preferences +from UM.Platform import Platform from UM.JobQueue import JobQueue from UM.SaveFile import SaveFile from UM.Scene.Selection import Selection @@ -58,7 +59,7 @@ import urllib numpy.seterr(all="ignore") #WORKAROUND: GITHUB-88 GITHUB-385 GITHUB-612 -if platform.system() == "Linux": # Needed for platform.linux_distribution, which is not available on Windows and OSX +if Platform.isLinux(): # Needed for platform.linux_distribution, which is not available on Windows and OSX # For Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826 if platform.linux_distribution()[0] in ("Ubuntu", ): # TODO: Needs a "if X11_GFX == 'nvidia'" here. The workaround is only needed on Ubuntu+NVidia drivers. Other drivers are not affected, but fine with this fix. import ctypes