From 58917098008f0c52566fe1b43abe15c185fb84d5 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Wed, 11 Jan 2017 19:08:46 +0100 Subject: [PATCH] Using UM.Platform and correcting something minor Since we already have UM.Platform, I think it is worth to get constancy into our code and use UM.Platform for our detection. Additionally, I corrected the head of the file, because I think I shall mention Cura and not Uranium. I guess the plugin was moved to Cura, so this was missed. --- plugins/RemovableDriveOutputDevice/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/RemovableDriveOutputDevice/__init__.py b/plugins/RemovableDriveOutputDevice/__init__.py index 16adcbfd7c..616fe6ee8c 100644 --- a/plugins/RemovableDriveOutputDevice/__init__.py +++ b/plugins/RemovableDriveOutputDevice/__init__.py @@ -1,7 +1,7 @@ # Copyright (c) 2015 Ultimaker B.V. -# Uranium is released under the terms of the AGPLv3 or higher. +# Cura is released under the terms of the AGPLv3 or higher. -import platform +from UM.Platform import Platform from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") @@ -18,15 +18,15 @@ def getMetaData(): } def register(app): - if platform.system() == "Windows": + if Platform.isWindows(): from . import WindowsRemovableDrivePlugin return { "output_device": WindowsRemovableDrivePlugin.WindowsRemovableDrivePlugin() } - elif platform.system() == "Darwin": + elif Platform.isOSX(): from . import OSXRemovableDrivePlugin return { "output_device": OSXRemovableDrivePlugin.OSXRemovableDrivePlugin() } - elif platform.system() == "Linux": + elif Platform.isLinux(): from . import LinuxRemovableDrivePlugin return { "output_device": LinuxRemovableDrivePlugin.LinuxRemovableDrivePlugin() } else: - Logger.log("e", "Unsupported system %s, no removable device hotplugging support available.", platform.system()) + Logger.log("e", "Unsupported system, thus no removable device hotplugging support available.") return { }