Ejemplo n.º 1
0
 def run(self):
     """Remove files and directories listed in self.__glob_targets."""
     clean.run(self)
     for targets in map(glob.glob, self.__glob_targets):
         for target in filter(os.path.isdir, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 shutil.rmtree(target)
         for target in filter(os.path.isfile, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 os.remove(target)
Ejemplo n.º 2
0
 def run(self):
     """Remove files and directories listed in self.__glob_targets."""
     clean.run(self)
     for targets in map(glob.glob, self.__glob_targets):
         for target in filter(os.path.isdir, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 shutil.rmtree(target)
         for target in filter(os.path.isfile, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 os.remove(target)
Ejemplo n.º 3
0
 def run(self):
     """Remove files and directories listed in manifests/clean."""
     clean.run(self)
     f = open(os.path.join("manifests", "clean.manifest"), "r")
     for targets in (glob.glob(x.strip()) for x in f):
         for target in filter(os.path.isdir, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 shutil.rmtree(target)
         for target in filter(os.path.isfile, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 os.remove(target)
     f.close()
Ejemplo n.º 4
0
 def run(self):
     """Remove files and directories listed in manifests/clean."""
     clean.run(self)
     f = open(os.path.join("manifests", "clean.manifest"), "r")
     for targets in (glob.glob(x.strip()) for x in f):
         for target in filter(os.path.isdir, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 shutil.rmtree(target)
         for target in filter(os.path.isfile, targets):
             log.info("removing '{}'".format(target))
             if not self.dry_run:
                 os.remove(target)
     f.close()
Ejemplo n.º 5
0
 def run(self):
     """Remove files and directories listed in setup-files/clean."""
     clean.run(self)
     fobj = open(os.path.join("setup-files", "clean"), "r")
     for targets in (glob.glob(x.strip()) for x in fobj):
         for target in filter(os.path.isdir, targets):
             log.info("removing '%s'" % target)
             if not self.dry_run:
                 shutil.rmtree(target)
         for target in filter(os.path.isfile, targets):
             log.info("removing '%s'" % target)
             if not self.dry_run:
                 os.remove(target)
     fobj.close()