Catch signal exception when imported from thread

This commit is contained in:
miruka 2019-12-27 09:28:46 -04:00
parent 77f851c319
commit ce733c6641

View File

@ -125,6 +125,11 @@ class QMLBridge:
# Make CTRL-C work again
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()