Skip to content

Commit e8c092a

Browse files
committed
fix cgitb
1 parent 393402d commit e8c092a

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed

Demo/FacePoints.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def onCapture(self):
163163

164164

165165
if __name__ == "__main__":
166-
sys.excepthook = cgitb.enable(1, None, 5, '')
166+
cgitb.enable(1, None, 5, '')
167167
app = QApplication(sys.argv)
168168
w = OpencvWidget()
169169
w.show()

Demo/GifCursor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs):
3838
if __name__ == '__main__':
3939
import sys
4040
import cgitb
41-
sys.excepthook = cgitb.enable(1, None, 5, '')
41+
cgitb.enable(1, None, 5, '')
4242
from PyQt5.QtWidgets import QApplication
4343
app = QApplication(sys.argv)
4444
w = Window()

QListView/SortItemByRole.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _initItems(self):
141141
if __name__ == '__main__':
142142
import sys
143143
import cgitb
144-
sys.excepthook = cgitb.enable(1, None, 5, '')
144+
cgitb.enable(1, None, 5, '')
145145
from PyQt5.QtWidgets import QApplication
146146
app = QApplication(sys.argv)
147147
w = Window()

QListWidget/DeleteCustomItem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def testData(self):
9191
if __name__ == '__main__':
9292
import sys
9393
import cgitb
94-
sys.excepthook = cgitb.enable(1, None, 5, 'text')
94+
cgitb.enable(1, None, 5, '')
9595
from PyQt5.QtWidgets import QApplication
9696
app = QApplication(sys.argv)
9797
w = Window()

QListWidget/FoldWidget.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, *args, **kwargs):
7979
if __name__ == '__main__':
8080
import sys
8181
import cgitb
82-
sys.excepthook = cgitb.enable(1, None, 5, '')
82+
cgitb.enable(1, None, 5, '')
8383
from PyQt5.QtWidgets import QApplication
8484
app = QApplication(sys.argv)
8585
# 通过qss改变按钮的高度

QMenu/MultiSelect.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _checkAction(self):
7070
if __name__ == '__main__':
7171
import sys
7272
import cgitb
73-
sys.excepthook = cgitb.enable(1, None, 5, 'text')
73+
cgitb.enable(1, None, 5, '')
7474
from PyQt5.QtWidgets import QApplication
7575
app = QApplication(sys.argv)
7676
w = Window()

QPropertyAnimation/RlatticeEffect.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def animate(self, painter):
220220
if __name__ == '__main__':
221221
import sys
222222
import cgitb
223-
sys.excepthook = cgitb.enable(1, None, 5, '')
223+
cgitb.enable(1, None, 5, '')
224224
from PyQt5.QtWidgets import QApplication
225225
app = QApplication(sys.argv)
226226
w = Window()

QSerialPort/SerialDebugAssistant.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def closeEvent(self, event):
139139
if __name__ == '__main__':
140140
import sys
141141
import cgitb
142-
sys.excepthook = cgitb.enable(1, None, 5, '')
142+
cgitb.enable(1, None, 5, '')
143143
from PyQt5.QtWidgets import QApplication
144144
app = QApplication(sys.argv)
145145
w = Window()

QSlider/ClickJumpSlider.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, *args, **kwargs):
7878
if __name__ == '__main__':
7979
import sys
8080
import cgitb
81-
sys.excepthook = cgitb.enable(1, None, 5, '')
81+
cgitb.enable(1, None, 5, '')
8282
from PyQt5.QtWidgets import QApplication
8383
app = QApplication(sys.argv)
8484
w = DemoWindow()

QThread/WakeupThread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def doWake(self):
7575
if __name__ == '__main__':
7676
import sys
7777
import cgitb
78-
sys.excepthook = cgitb.enable(1, None, 5, '')
78+
cgitb.enable(1, None, 5, '')
7979
from PyQt5.QtWidgets import QApplication
8080
app = QApplication(sys.argv)
8181
w = Window()

QWebEngineView/ScreenShotPage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def saveImage(self, image):
185185
# 开启F12 控制台功能,需要单独通过浏览器打开这个页面
186186
# 这里可以做个保护, 发布软件,启动时把这个环境变量删掉。防止他人通过环境变量开启
187187
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = '9966'
188-
sys.excepthook = cgitb.enable(1, None, 5, '')
188+
cgitb.enable(1, None, 5, '')
189189
app = QApplication(sys.argv)
190190
w = Window()
191191
w.show()

QWebView/GetCookie.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def onLoadFinished(self):
6868

6969

7070
if __name__ == "__main__":
71-
sys.excepthook = cgitb.enable(1, None, 5, '')
71+
cgitb.enable(1, None, 5, '')
7272
app = QApplication(sys.argv)
7373
w = WebView()
7474
w.show()

QWebView/ScreenShotPage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def saveImage(self, image):
165165

166166

167167
if __name__ == "__main__":
168-
sys.excepthook = cgitb.enable(1, None, 5, '')
168+
cgitb.enable(1, None, 5, '')
169169
app = QApplication(sys.argv)
170170
w = Window()
171171
w.show()

Test/Network/窗口配合异步Http/窗口配合异步Http.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def closeEvent(self, event):
132132
import cgitb
133133
import os
134134
os.makedirs('tmp', exist_ok=True)
135-
sys.excepthook = cgitb.enable(1, None, 5, 'text')
135+
cgitb.enable(1, None, 5, '')
136136
app = QApplication(sys.argv)
137137
loop = QEventLoop(app)
138138
asyncio.set_event_loop(loop)

0 commit comments

Comments
 (0)