#NEWLINE# def build( self ) : #NEWLINE# #INDENT# if ( self . _building is True ) : #NEWLINE# #INDENT# msg = 'Circuit {} already started build process.' #NEWLINE# raise RuntimeError ( msg . format ( self . circuit_id ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . _tasks = path . getPath ( self . _netstatus , self . _guard_manager , exit_request = e . request ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . _buildFailed ( e ) #NEWLINE# return #NEWLINE# #UNINDENT# self . _current_task = self . _tasks #NEWLINE# self . _tasks . addCallback ( self . _build ) #NEWLINE# self . _tasks . addCallback ( self . _buildSucceeded ) #NEWLINE# self . _tasks . addErrback ( self . _buildFailed ) #NEWLINE# self . _building = True