@@ -137,7 +137,7 @@ def _create_qApp():
137137 if display is None or not re .search (':\d' , display ):
138138 raise RuntimeError ('Invalid DISPLAY variable' )
139139
140- qApp = QtWidgets .QApplication ([str (" " )])
140+ qApp = QtWidgets .QApplication ([six . text_type (" " )])
141141 qApp .lastWindowClosed .connect (qApp .quit )
142142 else :
143143 qApp = app
@@ -560,7 +560,7 @@ def destroy(self, *args):
560560 self .window .close ()
561561
562562 def get_window_title (self ):
563- return str (self .window .windowTitle ())
563+ return six . text_type (self .window .windowTitle ())
564564
565565 def set_window_title (self , title ):
566566 self .window .setWindowTitle (title )
@@ -733,7 +733,7 @@ def save_figure(self, *args):
733733 self .canvas .print_figure (six .text_type (fname ))
734734 except Exception as e :
735735 QtWidgets .QMessageBox .critical (
736- self , "Error saving file" , str (e ),
736+ self , "Error saving file" , six . text_type (e ),
737737 QtWidgets .QMessageBox .Ok , QtWidgets .QMessageBox .NoButton )
738738
739739
@@ -849,7 +849,7 @@ def exception_handler(type, value, tb):
849849 if hasattr (value , 'strerror' ) and value .strerror is not None :
850850 msg += value .strerror
851851 else :
852- msg += str (value )
852+ msg += six . text_type (value )
853853
854854 if len (msg ):
855855 error_msg_qt (msg )
0 commit comments