Correct type of logged item

This commit is contained in:
Ghostkeeper 2019-09-12 15:58:09 +02:00
parent 3a3aeb92a9
commit b8ab04df4a
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
3 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ class CloudOutputDeviceManager:
# Persistent dict containing the remote clusters for the authenticated user. # Persistent dict containing the remote clusters for the authenticated user.
self._remote_clusters = {} # type: Dict[str, CloudOutputDevice] self._remote_clusters = {} # type: Dict[str, CloudOutputDevice]
self._account = CuraApplication.getInstance().getCuraAPI().account # type: Account self._account = CuraApplication.getInstance().getCuraAPI().account # type: Account
self._api = CloudApiClient(self._account, on_error = lambda error: Logger.log("e", error)) self._api = CloudApiClient(self._account, on_error = lambda error: Logger.log("e", str(error)))
self._account.loginStateChanged.connect(self._onLoginStateChanged) self._account.loginStateChanged.connect(self._onLoginStateChanged)
# Create a timer to update the remote cluster list # Create a timer to update the remote cluster list

View file

@ -169,5 +169,5 @@ class LocalClusterOutputDevice(UltimakerNetworkedPrinterOutputDevice):
## Get the API client instance. ## Get the API client instance.
def _getApiClient(self) -> ClusterApiClient: def _getApiClient(self) -> ClusterApiClient:
if not self._cluster_api: if not self._cluster_api:
self._cluster_api = ClusterApiClient(self.address, on_error = lambda error: Logger.log("e", error)) self._cluster_api = ClusterApiClient(self.address, on_error = lambda error: Logger.log("e", str(error)))
return self._cluster_api return self._cluster_api

View file

@ -67,7 +67,7 @@ class LocalClusterOutputDeviceManager:
## Add a networked printer manually by address. ## Add a networked printer manually by address.
def addManualDevice(self, address: str, callback: Optional[Callable[[bool, str], None]] = None) -> None: def addManualDevice(self, address: str, callback: Optional[Callable[[bool, str], None]] = None) -> None:
api_client = ClusterApiClient(address, lambda error: Logger.log("e", error)) api_client = ClusterApiClient(address, lambda error: Logger.log("e", str(error)))
api_client.getSystem(lambda status: self._onCheckManualDeviceResponse(address, status, callback)) api_client.getSystem(lambda status: self._onCheckManualDeviceResponse(address, status, callback))
## Remove a manually added networked printer. ## Remove a manually added networked printer.