@@ -137,7 +137,7 @@ def _create_qApp():
137
137
if display is None or not re .search (':\d' , display ):
138
138
raise RuntimeError ('Invalid DISPLAY variable' )
139
139
140
- qApp = QtWidgets .QApplication ([str (" " )])
140
+ qApp = QtWidgets .QApplication ([six . text_type (" " )])
141
141
qApp .lastWindowClosed .connect (qApp .quit )
142
142
else :
143
143
qApp = app
@@ -557,7 +557,7 @@ def destroy(self, *args):
557
557
self .window .close ()
558
558
559
559
def get_window_title (self ):
560
- return str (self .window .windowTitle ())
560
+ return six . text_type (self .window .windowTitle ())
561
561
562
562
def set_window_title (self , title ):
563
563
self .window .setWindowTitle (title )
@@ -730,7 +730,7 @@ def save_figure(self, *args):
730
730
self .canvas .print_figure (six .text_type (fname ))
731
731
except Exception as e :
732
732
QtWidgets .QMessageBox .critical (
733
- self , "Error saving file" , str (e ),
733
+ self , "Error saving file" , six . text_type (e ),
734
734
QtWidgets .QMessageBox .Ok , QtWidgets .QMessageBox .NoButton )
735
735
736
736
@@ -846,7 +846,7 @@ def exception_handler(type, value, tb):
846
846
if hasattr (value , 'strerror' ) and value .strerror is not None :
847
847
msg += value .strerror
848
848
else :
849
- msg += str (value )
849
+ msg += six . text_type (value )
850
850
851
851
if len (msg ):
852
852
error_msg_qt (msg )
0 commit comments