mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix mypy issues with the DigitalLibrary plugin
This commit is contained in:
parent
83767764db
commit
bc408a5a67
7 changed files with 43 additions and 30 deletions
|
@ -123,7 +123,7 @@ class DFFileExportAndUploadManager:
|
|||
if isinstance(file_upload_response, DFLibraryFileUploadResponse):
|
||||
file_name = file_upload_response.file_name
|
||||
elif isinstance(file_upload_response, DFPrintJobUploadResponse):
|
||||
file_name = file_upload_response.job_name
|
||||
file_name = file_upload_response.job_name if file_upload_response.job_name is not None else ""
|
||||
else:
|
||||
Logger.log("e", "Wrong response type received. Aborting uploading file to the Digital Library")
|
||||
return
|
||||
|
@ -273,7 +273,7 @@ class DFFileExportAndUploadManager:
|
|||
if reply_body:
|
||||
reply_dict = json.loads(reply_body)
|
||||
if "errors" in reply_dict and len(reply_dict["errors"]) >= 1 and "title" in reply_dict["errors"][0]:
|
||||
error_title = reply_dict["errors"][0]["title"] # type: str
|
||||
error_title = reply_dict["errors"][0]["title"]
|
||||
return error_title
|
||||
|
||||
def _onUploadError(self, filename: str, reply: "QNetworkReply", error: "QNetworkReply.NetworkError") -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue