mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Remove absolute plugin imports, some fixes
This commit is contained in:
parent
7d69b1727d
commit
ddd282eef3
16 changed files with 67 additions and 62 deletions
|
@ -101,14 +101,9 @@ class CloudApiClient:
|
|||
# \param cluster_id: The ID of the cluster.
|
||||
# \param cluster_job_id: The ID of the print job within the cluster.
|
||||
# \param action: The name of the action to execute.
|
||||
def doPrintJobAction(self, cluster_id: str, cluster_job_id: str, action: str, data: Optional[Dict[str, Any]] = None) -> None:
|
||||
body = b""
|
||||
if data:
|
||||
try:
|
||||
body = json.dumps({"data": data}).encode()
|
||||
except JSONDecodeError as err:
|
||||
Logger.log("w", "Could not encode body: %s", err)
|
||||
return
|
||||
def doPrintJobAction(self, cluster_id: str, cluster_job_id: str, action: str, data: Optional[Dict[str, Any]] = None
|
||||
) -> None:
|
||||
body = json.dumps({"data": data}).encode() if data else b""
|
||||
url = "{}/clusters/{}/print_jobs/{}/action/{}".format(self.CLUSTER_API_ROOT, cluster_id, cluster_job_id, action)
|
||||
self._manager.post(self._createEmptyRequest(url), body)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue