mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 16:57:51 -06:00
Fix some formatting, cleanup import
This commit is contained in:
parent
dc17bd8499
commit
0b1ac87354
2 changed files with 19 additions and 26 deletions
|
@ -48,10 +48,10 @@ class SendMaterialJob(Job):
|
|||
try:
|
||||
remote_materials_by_guid = self._parseReply(reply)
|
||||
self._sendMissingMaterials(remote_materials_by_guid)
|
||||
except json.JSONDecodeError as e:
|
||||
Logger.log("e", "Error parsing materials from printer: %s", e)
|
||||
except KeyError as e:
|
||||
Logger.log("e", "Error parsing materials from printer: %s", e)
|
||||
except json.JSONDecodeError:
|
||||
Logger.logException("w", "Error parsing materials from printer")
|
||||
except KeyError:
|
||||
Logger.logException("w", "Error parsing materials from printer")
|
||||
|
||||
## Determine which materials should be updated and send them to the printer.
|
||||
#
|
||||
|
@ -157,7 +157,6 @@ class SendMaterialJob(Job):
|
|||
@classmethod
|
||||
def _parseReply(cls, reply: QNetworkReply) -> Dict[str, ClusterMaterial]:
|
||||
remote_materials_list = json.loads(reply.readAll().data().decode("utf-8"))
|
||||
print("remote_materials_list", remote_materials_list)
|
||||
return {material["guid"]: ClusterMaterial(**material) for material in remote_materials_list}
|
||||
|
||||
## Retrieves a list of local materials
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue