[MERGE] show versions of plugins in 'bzr plugins'

Robert Collins robertc at robertcollins.net
Wed Aug 29 02:49:53 BST 2007


On Tue, 2007-08-28 at 21:43 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> 
> > + at deprecated_function(zero_ninetyone)
> >  def all_plugins():
> >      """Return a dictionary of the plugins."""
> >      result = {}
> > -    for name, plugin in plugins.__dict__.items():
> > -        if isinstance(plugin, types.ModuleType):
> > -            result[name] = plugin
> > +    for name, plugin in plugins().items():
> > +        result[name] = plugin.module
> >      return result
> 
> I find this is a really nice way of doing that:
> 
> def all_plugins():
>     return dict((n, p.module) for n, p in plugins().items())
> 
> bb:approve

Thanks, I'll put that change in.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070829/2a2d30fe/attachment.pgp 


More information about the bazaar mailing list