On Fri, Dec 31, 2010 at 12:52:34PM +0000, Michael Hanselmann wrote: > Am 31. Dezember 2010 09:55 schrieb Iustin Pop <[email protected]>: > > On Thu, Dec 30, 2010 at 06:50:29PM +0100, Michael Hanselmann wrote: > >> This function will also be used by opcode parameter checks. > > > > utils is really overloaded this days; I also see you import it later in > > opcodes (gasp!). Since we already created other modules for small parts > > of cmdlid (e.g. masterd/instance), can't we move this and whatever else > > the code moved to opcodes to its own library? > > I initially tried to keep it in opcodes.py to avoid importing “utils”, > but then I realized that _CheckDiskTemplate uses “utils.CommaJoin”. To > avoid having to import “opcodes” into “cmdlib”, I just moved > RequireFileStorage to “utils”. I absolutely agree that “utils” (like > “cmdlib”) is larger than it should be. Instead of adding a new module > for this function, I suggest to split the whole “utils” module into > smaller parts (e.g. utils.io, utils.time, utils.misc) in a separate > patch series. What do you think?
Sounds good, although I don't see that as important as not growing utils.py. iustin
