fix cgitb

This commit is contained in:
Irony 2020-06-16 19:51:20 +08:00
parent 393402df60
commit e8c092a351
14 changed files with 14 additions and 14 deletions

View file

@ -163,7 +163,7 @@ class OpencvWidget(QLabel):
if __name__ == "__main__":
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = OpencvWidget()
w.show()

View file

@ -38,7 +38,7 @@ class Window(QWidget, QCursorGif):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -141,7 +141,7 @@ class Window(QWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -91,7 +91,7 @@ class Window(QWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, 'text')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -79,7 +79,7 @@ class Window(QListWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
# 通过qss改变按钮的高度

View file

@ -70,7 +70,7 @@ class Window(QWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, 'text')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -220,7 +220,7 @@ class Window(QWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -139,7 +139,7 @@ class Window(QWidget, Ui_FormSerialPort):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -78,7 +78,7 @@ class DemoWindow(QWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = DemoWindow()

View file

@ -75,7 +75,7 @@ class Window(QWidget):
if __name__ == '__main__':
import sys
import cgitb
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
w = Window()

View file

@ -185,7 +185,7 @@ if __name__ == "__main__":
# 开启F12 控制台功能,需要单独通过浏览器打开这个页面
# 这里可以做个保护, 发布软件,启动时把这个环境变量删掉。防止他人通过环境变量开启
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = '9966'
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = Window()
w.show()

View file

@ -68,7 +68,7 @@ class WebView(QWebView):
if __name__ == "__main__":
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = WebView()
w.show()

View file

@ -165,7 +165,7 @@ class Window(QWidget):
if __name__ == "__main__":
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = Window()
w.show()

View file

@ -132,7 +132,7 @@ if __name__ == '__main__':
import cgitb
import os
os.makedirs('tmp', exist_ok=True)
sys.excepthook = cgitb.enable(1, None, 5, 'text')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
loop = QEventLoop(app)
asyncio.set_event_loop(loop)