#NEWLINE# def wire_projects_and_folders( projects , folders , tasks ) : #NEWLINE# #INDENT# logger . debug ( 'wiring projects and folders' ) #NEWLINE# for project in projects . values ( ) : #NEWLINE# #INDENT# project_info = project . project_info #NEWLINE# if ( project . project_info != None ) : #NEWLINE# #INDENT# folder_ref = task . ofattribs [ 'folder' ] #NEWLINE# if ( folder_ref != None ) : #NEWLINE# #INDENT# logger . debug ( 'wiring: %s %s' , project . id , project . name ) #NEWLINE# folder = folders [ folder_ref ] #NEWLINE# project . folder = folder #NEWLINE# folder . add_child ( project ) #NEWLINE# #UNINDENT# #UNINDENT# if ( project_info . next_task != None ) : #NEWLINE# #INDENT# task = tasks [ project_info . next_task ] #NEWLINE# task . next = True