Skip to content

Commit fc20264

Browse files
committed
Catch SystemError During Signal.disconnect()
With PySide6 6.7.1, a SystemError will be emitted when attempting to disconnect a signal that is not connected.
1 parent 3d9831a commit fc20264

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyqtgraph/functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3117,7 +3117,11 @@ def disconnect(signal, slot):
31173117
success = signal.disconnect(slot)
31183118
if success is None: # PyQt
31193119
success = True
3120-
except (TypeError, RuntimeError):
3120+
except (
3121+
TypeError,
3122+
RuntimeError,
3123+
SystemError # PySide6 6.7.1+ will emit this
3124+
):
31213125
success = False
31223126

31233127
if success:

0 commit comments

Comments
 (0)