@@ -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
@@ -560,7 +560,7 @@ def destroy(self, *args):
560
560
self .window .close ()
561
561
562
562
def get_window_title (self ):
563
- return str (self .window .windowTitle ())
563
+ return six . text_type (self .window .windowTitle ())
564
564
565
565
def set_window_title (self , title ):
566
566
self .window .setWindowTitle (title )
@@ -733,7 +733,7 @@ def save_figure(self, *args):
733
733
self .canvas .print_figure (six .text_type (fname ))
734
734
except Exception as e :
735
735
QtWidgets .QMessageBox .critical (
736
- self , "Error saving file" , str (e ),
736
+ self , "Error saving file" , six . text_type (e ),
737
737
QtWidgets .QMessageBox .Ok , QtWidgets .QMessageBox .NoButton )
738
738
739
739
@@ -849,7 +849,7 @@ def exception_handler(type, value, tb):
849
849
if hasattr (value , 'strerror' ) and value .strerror is not None :
850
850
msg += value .strerror
851
851
else :
852
- msg += str (value )
852
+ msg += six . text_type (value )
853
853
854
854
if len (msg ):
855
855
error_msg_qt (msg )
0 commit comments