File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ def _create_qApp():
121
121
if display is None or not re .search (r':\d' , display ):
122
122
raise RuntimeError ('Invalid DISPLAY variable' )
123
123
124
- qApp = QtWidgets .QApplication (["matplotlib" ])
124
+ qApp = QtWidgets .QApplication ([b "matplotlib" ])
125
125
qApp .lastWindowClosed .connect (qApp .quit )
126
126
else :
127
127
qApp = app
@@ -170,11 +170,8 @@ def wrapper(self, **kwargs):
170
170
QtWidgets .QWidget .__init__ = cooperative_qwidget_init
171
171
__init__ (self , ** kwargs )
172
172
finally :
173
- try :
174
- # Restore __init__ to sip.simplewrapper.__init__.
175
- del QtWidgets .QWidget .__init__
176
- except AttributeError :
177
- pass
173
+ # Restore __init__
174
+ QtWidgets .QWidget .__init__ = qwidget_init
178
175
179
176
return wrapper
180
177
You can’t perform that action at this time.
0 commit comments