#NEWLINE# def tryConnectThread( self ) : #NEWLINE# #INDENT# while ( not self . startFuseThreadExit ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . startFuseEvent . wait ( ) #NEWLINE# self . startFuseEvent . clear ( ) #NEWLINE# if ( ( getSetting ( 'fuse_enabled' ) == True ) and ( not self . interop . isConnected ( ) ) ) : #NEWLINE# #INDENT# path = getFusePathFromSettings ( ) #NEWLINE# try : #NEWLINE# #INDENT# start_daemon = [ path , 'daemon' , '-b' ] #NEWLINE# log ( ) . info ( "Calling subprocess '%s'" , str ( start_daemon ) ) #NEWLINE# if ( os . name == 'nt' ) : #NEWLINE# #INDENT# CREATE_NO_WINDOW = 134217728 #NEWLINE# subprocess . check_output ( start_daemon , creationflags = CREATE_NO_WINDOW , stderr = subprocess . STDOUT ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# subprocess . check_output ( start_daemon , stderr = subprocess . STDOUT ) #NEWLINE# #UNINDENT# #UNINDENT# except subprocess . CalledProcessError as e : #NEWLINE# #INDENT# log ( ) . error ( ( ( ( ( 'Fuse returned exit status ' + str ( e . returncode ) ) + ". Output was '" ) + e . output . decode ( 'utf-8' ) ) + "'." ) ) #NEWLINE# error_message ( ( 'Error starting Fuse:\n\n' + e . output . decode ( 'utf-8' ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# log ( ) . error ( ( 'Fuse not found: ' + traceback . format_exc ( ) ) ) #NEWLINE# gFuse . showFuseNotFound ( ) #NEWLINE# return #NEWLINE# #UNINDENT# self . interop . connect ( ) #NEWLINE# if ( self . fuseStartedCallback is not None ) : #NEWLINE# #INDENT# self . fuseStartedCallback ( ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# log ( ) . error ( traceback . format_exc ( ) )