[Buildbot-commits] [Buildbot] #2324: Please add the ability to automatically delete unused build directories

Buildbot nobody at buildbot.net
Tue Jul 10 08:22:04 UTC 2012


#2324: Please add the ability to automatically delete unused build directories
-------------------------------------+------------------------
Reporter:  smat                      |       Owner:
    Type:  enhancement               |      Status:  new
Priority:  major                     |   Milestone:  undecided
 Version:  master                    |  Resolution:
Keywords:  unused build directories  |
-------------------------------------+------------------------

Comment (by smat):

 Formatting for the example implementation went awry in the description,
 Wiki formatted text as follows:

 {{{
 Example trivial implementation for *NIX (not reliable on Windows due to
 inability to delete open files, importing shutil not shown):
          for d in os.listdir(self.basedir):
 -            if os.path.isdir(os.path.join(self.basedir, d)):
 +            path = os.path.join(self.basedir, d)
 +            if os.path.isdir(path):
                  if d not in wanted_dirs:
                      log.msg("I have a leftover directory '%s' that is not
 "
 -                            "being used by the buildmaster: you can
 delete "
 -                            "it now" % d)
 +                            "being used by the buildmaster: deleting now"
 +                            % d)
 +                    shutil.rmtree(path)
          return retval
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2324#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list