Turn on overflow checking in sip
This commit is contained in:
parent
0d8edd54fb
commit
8d34d4d4f5
@ -230,8 +230,8 @@ def check_libraries():
|
|||||||
_check_modules(modules)
|
_check_modules(modules)
|
||||||
|
|
||||||
|
|
||||||
def remove_inputhook():
|
def configure_pyqt():
|
||||||
"""Remove the PyQt input hook.
|
"""Remove the PyQt input hook and enable overflow checking.
|
||||||
|
|
||||||
Doing this means we can't use the interactive shell anymore (which we don't
|
Doing this means we can't use the interactive shell anymore (which we don't
|
||||||
anyways), but we can use pdb instead.
|
anyways), but we can use pdb instead.
|
||||||
@ -239,6 +239,13 @@ def remove_inputhook():
|
|||||||
from PyQt5.QtCore import pyqtRemoveInputHook
|
from PyQt5.QtCore import pyqtRemoveInputHook
|
||||||
pyqtRemoveInputHook()
|
pyqtRemoveInputHook()
|
||||||
|
|
||||||
|
import sip
|
||||||
|
try:
|
||||||
|
# Added in sip 4.19.4
|
||||||
|
sip.enableoverflowchecking(True)
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def init_log(args):
|
def init_log(args):
|
||||||
"""Initialize logging.
|
"""Initialize logging.
|
||||||
@ -279,6 +286,6 @@ def early_init(args):
|
|||||||
# errors, so people only using the GUI notice them as well.
|
# errors, so people only using the GUI notice them as well.
|
||||||
check_libraries()
|
check_libraries()
|
||||||
check_qt_version()
|
check_qt_version()
|
||||||
remove_inputhook()
|
configure_pyqt()
|
||||||
check_ssl_support()
|
check_ssl_support()
|
||||||
check_optimize_flag()
|
check_optimize_flag()
|
||||||
|
Loading…
Reference in New Issue
Block a user