#NEWLINE# @ messagebox_on_error ( 'Failed to export session' ) #NEWLINE# def _choose_export_session( self , saver , checker , outmode ) : #NEWLINE# #INDENT# checker ( self ) #NEWLINE# if ( outmode in [ 'file' , 'directory' ] ) : #NEWLINE# #INDENT# ( outfile , file_filter ) = QtGui . QFileDialog . getSaveFileName ( self ) #NEWLINE# if ( not outfile ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# return saver ( self , outfile ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( outmode == 'label' ) #NEWLINE# ( label , ok ) = QtGui . QInputDialog . getText ( outfile , 'Choose a label:' , 'Choose a label:' ) #NEWLINE# if ( not ok ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# return saver ( self , label )