Catch signal exception when imported from thread
This commit is contained in:
parent
77f851c319
commit
ce733c6641
|
@ -125,6 +125,11 @@ class QMLBridge:
|
||||||
|
|
||||||
|
|
||||||
# Make CTRL-C work again
|
# Make CTRL-C work again
|
||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
try:
|
||||||
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
except ValueError:
|
||||||
|
# FIXME - happens when we're imported from a thread,
|
||||||
|
# occurs in py3.8 but not 3.6?
|
||||||
|
pass
|
||||||
|
|
||||||
BRIDGE = QMLBridge()
|
BRIDGE = QMLBridge()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user