Minor fixes

CURA-4224

 - Fix code style
 - Fix typos
This commit is contained in:
Lipu Fei 2017-09-13 17:44:53 +02:00
parent 2e1c6abe0e
commit be57ccb127
3 changed files with 17 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# Copyright (c) 2015 Ultimaker B.V.
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Application import Application
from UM.Extension import Extension
from UM.Preferences import Preferences
from UM.Logger import Logger
@ -33,9 +33,9 @@ class FirmwareUpdateChecker(Extension):
ContainerRegistry.getInstance().containerAdded.connect(self._onContainerAdded)
def _onContainerAdded(self, container):
# Only take care when a new GlobaStack was added
if (isinstance(container, GlobalStack)):
Logger.log("i", "You have a '%s' in printer list. Let's check the firmware!" % container.getId())
# Only take care when a new GlobalStack was added
if isinstance(container, GlobalStack):
Logger.log("i", "You have a '%s' in printer list. Let's check the firmware!", container.getId())
self.checkFirmwareVersion(container, True)
## Connect with software.ultimaker.com, load latest.version and check version info.
@ -46,4 +46,4 @@ class FirmwareUpdateChecker(Extension):
# This is used when checking for a new firmware version at startup.
def checkFirmwareVersion(self, container = None, silent = False):
job = FirmwareUpdateCheckerJob(container = container, silent = silent, url = self.url)
job.start()
job.start()