Ejemplo n.º 1
0
    def execute(self, task = None):
        if task is not None:
            self.check(task)

        # Preform a directory change if desired
        if self.destDir is not None:
            # Record current working directory
            self.cwd = os.getcwd()
            # Change to desired directory
            os.chdir(self.destDir)
            
        safe_system(self.getcmd())

        # Change back to original working dir if needed
        if self.cwd is not None:
            assert self.destDir is not None
            os.chdir(self.cwd)
Ejemplo n.º 2
0
    def execute(self, task=None):
        if task is not None:
            self.check(task)

        # Preform a directory change if desired
        if self.destDir is not None:
            # Record current working directory
            self.cwd = os.getcwd()
            # Change to desired directory
            os.chdir(self.destDir)

        safe_system(self.getcmd())

        # Change back to original working dir if needed
        if self.cwd is not None:
            assert self.destDir is not None
            os.chdir(self.cwd)
Ejemplo n.º 3
0
 def execute(self, task = None):
     if task is not None:
         self.check(task)
     safe_system(self.getcmd())
Ejemplo n.º 4
0
 def execute(self, task=None):
     if task is not None:
         self.check(task)
     safe_system(self.getcmd())