Skip to content

Commit

Permalink
fix cgitb
Browse files Browse the repository at this point in the history
  • Loading branch information
892768447 committed Jun 16, 2020
1 parent 393402d commit e8c092a
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Demo/FacePoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def onCapture(self):


if __name__ == "__main__":
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = OpencvWidget()
w.show()
Expand Down
2 changes: 1 addition & 1 deletion Demo/GifCursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs):
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()
Expand Down
2 changes: 1 addition & 1 deletion QListView/SortItemByRole.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _initItems(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion QListWidget/DeleteCustomItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def testData(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion QListWidget/FoldWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, *args, **kwargs):
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改变按钮的高度
Expand Down
2 changes: 1 addition & 1 deletion QMenu/MultiSelect.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _checkAction(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion QPropertyAnimation/RlatticeEffect.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def animate(self, painter):
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()
Expand Down
2 changes: 1 addition & 1 deletion QSerialPort/SerialDebugAssistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def closeEvent(self, event):
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()
Expand Down
2 changes: 1 addition & 1 deletion QSlider/ClickJumpSlider.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, *args, **kwargs):
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()
Expand Down
2 changes: 1 addition & 1 deletion QThread/WakeupThread.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def doWake(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion QWebEngineView/ScreenShotPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def saveImage(self, image):
# 开启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()
Expand Down
2 changes: 1 addition & 1 deletion QWebView/GetCookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def onLoadFinished(self):


if __name__ == "__main__":
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = WebView()
w.show()
Expand Down
2 changes: 1 addition & 1 deletion QWebView/ScreenShotPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def saveImage(self, image):


if __name__ == "__main__":
sys.excepthook = cgitb.enable(1, None, 5, '')
cgitb.enable(1, None, 5, '')
app = QApplication(sys.argv)
w = Window()
w.show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def closeEvent(self, event):
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)
Expand Down

0 comments on commit e8c092a

Please sign in to comment.