Apply the @override decorator

CL-228
This commit is contained in:
Simon Edwards 2017-10-02 17:05:39 +02:00
parent 2ae5334dde
commit b5b3f47e4d

View File

@ -13,6 +13,7 @@ from PyQt5.QtGui import QDesktopServices
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkReply from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkReply
from PyQt5.QtQml import QQmlComponent, QQmlContext from PyQt5.QtQml import QQmlComponent, QQmlContext
from UM.Application import Application from UM.Application import Application
from UM.Decorators import override
from UM.Logger import Logger from UM.Logger import Logger
from UM.Message import Message from UM.Message import Message
from UM.OutputDevice import OutputDeviceError from UM.OutputDevice import OutputDeviceError
@ -114,15 +115,19 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
## No authentication, so requestAuthentication should do exactly nothing ## No authentication, so requestAuthentication should do exactly nothing
@pyqtSlot() @pyqtSlot()
@override(NetworkPrinterOutputDevice)
def requestAuthentication(self, message_id = None, action_id = "Retry"): def requestAuthentication(self, message_id = None, action_id = "Retry"):
Logger.log("d", "requestAuthentication for Cura Connect - nothing to be done") pass # Cura Connect doesn't do any authorization
@override(NetworkPrinterOutputDevice)
def setAuthenticationState(self, auth_state): def setAuthenticationState(self, auth_state):
self._authentication_state = NetworkPrinterOutputDevice.AuthState.Authenticated # The printer is always authenticated self._authentication_state = NetworkPrinterOutputDevice.AuthState.Authenticated # The printer is always authenticated
@override(NetworkPrinterOutputDevice)
def _verifyAuthentication(self): def _verifyAuthentication(self):
pass pass
@override(NetworkPrinterOutputDevice)
def _checkAuthentication(self): def _checkAuthentication(self):
Logger.log("d", "_checkAuthentication Cura Connect - nothing to be done") Logger.log("d", "_checkAuthentication Cura Connect - nothing to be done")