#NEWLINE# def maybe_launch( self ) : #NEWLINE# #INDENT# if ( not self . watchman . is_alive ( ) ) : #NEWLINE# #INDENT# self . _logger . debug ( 'launching watchman' ) #NEWLINE# try : #NEWLINE# #INDENT# self . watchman . launch ( ) #NEWLINE# #UNINDENT# except ( self . watchman . ExecutionError , e . watchman . InvalidCommandOutput ) as e : #NEWLINE# #INDENT# self . _logger . critical ( 'failed to launch watchman: {exc!r})' . format ( exc = e ) ) #NEWLINE# return False #NEWLINE# #UNINDENT# #UNINDENT# self . _logger . debug ( 'watchman is running, pid={pid} socket={socket}' . format ( pid = self . watchman . pid , socket = self . watchman . socket ) ) #NEWLINE# time . sleep ( 5 ) #NEWLINE# return self . watchman