#NEWLINE# def wire_tasks_to_enclosing_projects( project_infos , tasks , inbox ) : #NEWLINE# #INDENT# logger . debug ( 'wiring tasks to enclosing projects' ) #NEWLINE# for task in tasks . values ( ) : #NEWLINE# #INDENT# if ( task . ofattribs [ 'containingProjectInfo' ] != None ) : #NEWLINE# #INDENT# logger . debug ( 'wiring: %s %s' , task . id , task . name ) #NEWLINE# project_info = project_infos [ task . ofattribs [ 'containingProjectInfo' ] ] #NEWLINE# project = project_info . project #NEWLINE# task . project = project #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if task . ofattribs [ 'inInbox' ] : #NEWLINE# #INDENT# inbox . add_child ( task )