mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Reading packages from archive now uses With context
This commit is contained in:
parent
defb22dc07
commit
7665f8a7cb
2 changed files with 31 additions and 35 deletions
|
@ -420,10 +420,9 @@ class Toolbox(QObject, Extension):
|
|||
|
||||
def _onDownloadComplete(self, file_path: str):
|
||||
Logger.log("i", "Toolbox: Download complete.")
|
||||
try:
|
||||
package_info = self._package_manager.getPackageInfo(file_path)
|
||||
except:
|
||||
Logger.logException("w", "Toolbox: Package file [%s] was not a valid CuraPackage.", file_path)
|
||||
package_info = self._package_manager.getPackageInfo(file_path)
|
||||
if not package_info:
|
||||
Logger.log("w", "Toolbox: Package file [%s] was not a valid CuraPackage.", file_path)
|
||||
return
|
||||
|
||||
license_content = self._package_manager.getPackageLicense(file_path)
|
||||
|
@ -434,8 +433,6 @@ class Toolbox(QObject, Extension):
|
|||
self.install(file_path)
|
||||
return
|
||||
|
||||
|
||||
|
||||
# Getter & Setters for Properties:
|
||||
# --------------------------------------------------------------------------
|
||||
def setDownloadProgress(self, progress: int):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue