Addon Manager: Fix bug in dependency installer
This commit is contained in:
committed by
Chris Hennes
parent
3826042529
commit
eeb481207f
@@ -116,7 +116,7 @@ class AddonInstaller(QtCore.QObject):
|
||||
|
||||
allowed_packages = set()
|
||||
|
||||
def __init__(self, addon: object, allow_list: List[str] = None):
|
||||
def __init__(self, addon: Addon, allow_list: List[str] = None):
|
||||
"""Initialize the installer with an optional list of addons. If provided, then installation
|
||||
by name is supported, as long as the objects in the list contain a "name" and "url"
|
||||
property. In most use cases it is expected that addons is a List of Addon objects, but that
|
||||
|
||||
@@ -36,7 +36,7 @@ from PySide import QtCore, QtWidgets
|
||||
from addonmanager_installer import AddonInstaller, MacroInstaller
|
||||
from addonmanager_dependency_installer import DependencyInstaller
|
||||
import addonmanager_utilities as utils
|
||||
from Addon import MissingDependencies
|
||||
from Addon import Addon, MissingDependencies
|
||||
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
@@ -58,11 +58,11 @@ class AddonInstallerGUI(QtCore.QObject):
|
||||
# Emitted once all work has been completed, regardless of success or failure
|
||||
finished = QtCore.Signal()
|
||||
|
||||
def __init__(self, addon: object, addons: List[object] = None):
|
||||
def __init__(self, addon: Addon, addons: List[Addon] = None):
|
||||
super().__init__()
|
||||
self.addon_to_install = addon
|
||||
self.addons = [] if addons is None else addons
|
||||
self.installer = AddonInstaller(addon, addons)
|
||||
self.installer = AddonInstaller(addon)
|
||||
self.dependency_installer = None
|
||||
self.install_worker = None
|
||||
self.dependency_dialog = None
|
||||
|
||||
@@ -439,7 +439,7 @@ def run_interruptable_subprocess(args) -> subprocess.CompletedProcess:
|
||||
while return_code is None:
|
||||
try:
|
||||
stdout, stderr = p.communicate(timeout=0.1)
|
||||
return_code = p.returncode if p.returncode is not None else -1
|
||||
return_code = p.returncode
|
||||
except subprocess.TimeoutExpired:
|
||||
if QtCore.QThread.currentThread().isInterruptionRequested():
|
||||
p.kill()
|
||||
|
||||
Reference in New Issue
Block a user