mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Merge pull request #4678 from fieldOfView/fix_networkprinter_post
Fix type error in NetworkedPrinterOutputDevice.post
This commit is contained in:
commit
59b8bdec54
2 changed files with 3 additions and 3 deletions
|
|
@ -213,7 +213,7 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
||||||
request = self._createEmptyRequest(target)
|
request = self._createEmptyRequest(target)
|
||||||
self._last_request_time = time()
|
self._last_request_time = time()
|
||||||
if self._manager is not None:
|
if self._manager is not None:
|
||||||
reply = self._manager.post(request, data)
|
reply = self._manager.post(request, data.encode())
|
||||||
if on_progress is not None:
|
if on_progress is not None:
|
||||||
reply.uploadProgress.connect(on_progress)
|
reply.uploadProgress.connect(on_progress)
|
||||||
self._registerOnFinishedCallback(reply, on_finished)
|
self._registerOnFinishedCallback(reply, on_finished)
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
|
|
||||||
self.post("auth/request",
|
self.post("auth/request",
|
||||||
json.dumps({"application": "Cura-" + CuraApplication.getInstance().getVersion(),
|
json.dumps({"application": "Cura-" + CuraApplication.getInstance().getVersion(),
|
||||||
"user": self._getUserName()}).encode(),
|
"user": self._getUserName()}),
|
||||||
on_finished=self._onRequestAuthenticationFinished)
|
on_finished=self._onRequestAuthenticationFinished)
|
||||||
|
|
||||||
self.setAuthenticationState(AuthState.AuthenticationRequested)
|
self.setAuthenticationState(AuthState.AuthenticationRequested)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue