doit/cmd_strace.py
def _execute(self, show_all):
        """1) wrap the original action with strace and save output in file
           2) add a second task that will generate the report from temp file
        """
        # find task to trace and wrap it
        selected = self.sel_tasks[0]
        for task in self.task_list:
            if task.name == selected:
                self.wrap_strace(task)
                break

        # add task to print report
        report_strace = Task(
            'strace_report',
            actions=[(find_deps, [self.outstream, self.TRACE_OUT, show_all])],
            verbosity=2,
            task_dep=[selected],
            uptodate=[False],
        )
        self.task_list.append(report_strace)
        self.sel_tasks.append(report_strace.name)

        # clear strace file
        return Run._execute(self, sys.stdout)
1) wrap the original action with strace and save output in file
           2) add a second task that will generate the report from temp file
        
1) wrap the original action with strace and save output in file
2) add a second task that will generate the report from temp file
1 ) wrap the original action with strace and save output in file 2 ) add a second task that will generate the report from temp file
def _execute(self, show_all):
        selected = self.sel_tasks[0]
        for task in self.task_list:
            if task.name == selected:
                self.wrap_strace(task)
                break
        report_strace = Task(
            'strace_report',
            actions=[(find_deps, [self.outstream, self.TRACE_OUT, show_all])],
            verbosity=2,
            task_dep=[selected],
            uptodate=[False],
        )
        self.task_list.append(report_strace)
        self.sel_tasks.append(report_strace.name)
        return Run._execute(self, sys.stdout)
def _execute ( self , show_all ) : selected = self . sel_tasks [ 0 ] for task in self . task_list : if task . name == selected : self . wrap_strace ( task ) break report_strace = Task ( 'strace_report' , actions = [ ( find_deps , [ self . outstream , self . TRACE_OUT , show_all ] ) ] , verbosity = 2 , task_dep = [ selected ] , uptodate = [ False ] , ) self . task_list . append ( report_strace ) self . sel_tasks . append ( report_strace . name ) return Run . _execute ( self , sys . stdout )
1) wrap the original action with strace and save output in file
2) add a second task that will generate the report from temp file
1 ) wrap the original action with strace and save output in file 2 ) add a second task that will generate the report from temp file
"""1) wrap the original action with strace and save output in file
           2) add a second task that will generate the report from temp file
        """ # find task to trace and wrap it # add task to print report # clear strace file
self
show_all