[Buildbot-devel] Ultimate fix for 'buildbot reconfig' problem

Andrii Senkovych jolly_roger at itblog.org.ua
Tue Mar 26 23:02:41 UTC 2013


Hi,

Recently it was mentioned about how Mozilla solves the reconfig
problem[1]. The same approach is used in metabuildbot configs[2].
However there's a more clean and universal way of doing the same in
just three lines of code for any number of imported modules. Behold:

from types import ModuleType
x = ()
_ = [reload(x) for x in locals() if isinstance(x, ModuleType)]

Some additional comments are available inside this[3] gist.

  [1]: http://hg.mozilla.org/build/buildbot-configs/file/a880563582c9/mozilla/scheduler_master.cfg
  [2]: https://github.com/buildbot/metabbotcfg/blob/master/master.cfg
  [3]: https://gist.github.com/jollyroger/5250060




More information about the devel mailing list