-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Here reply is always None, rendering the function useless. That's a known peculiarity of PySide6.
AddonManager/NetworkManager.py
Line 550 in a38c8f0
| reply: QtNetwork.QNetworkReply = self.sender() |
As a workaround against that, I suggest changing
AddonManager/NetworkManager.py
Line 256 in a38c8f0
| reply.finished.connect(self.__reply_finished) |
to
reply.finished.connect(lambda r=reply: self.__reply_finished(r))and
AddonManager/NetworkManager.py
Lines 547 to 550 in a38c8f0
| def __reply_finished(self) -> None: | |
| """Called when a reply has been completed: this makes sure the data has been read and | |
| any notifications have been called.""" | |
| reply: QtNetwork.QNetworkReply = self.sender() |
to
def __reply_finished(self, reply: QtNetwork.QNetworkReply | None = None) -> None:
"""Called when a reply has been completed: this makes sure the data has been read and
any notifications have been called."""
if reply is None:
reply = self.sender()to maintain the compatibility with calls I might've missed. I find the solution dirty, but it works.
There are many more places like this, even in the file. That's the reason I make the issue, not a PR.
FreeCAD Info:
OS: Manjaro Linux (KDE/plasma/wayland)
Architecture: x86_64
Version: 1.0.2.39319 (Git)
Build type: Release
Branch: makepkg
Hash: 256fc7eff3379911ab5daf88e10182c509aa8052
Python 3.13.7, Qt 6.10.1, Coin 4.0.5, Vtk 9.5.2, OCC 7.9.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/
Installed mods:
CADExchangerfasteners-backup-before-zip-migration0.5.33 (Disabled) ← this proves the changes work well!fasteners0.5.43pcb6.2023.1manifest.json