Browse files

documentation touch-up

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
  • Loading branch information...
1 parent 8701107 commit 33fe817f79d34e7167cd9fca22a87acff177dc50 @dhellmann dhellmann committed Aug 15, 2012
Showing with 15 additions and 3 deletions.
  1. +8 −0 docs/source/managers.rst
  2. +6 −2 stevedore/extension.py
  3. +1 −1 stevedore/named.py
View
8 docs/source/managers.rst
@@ -7,34 +7,42 @@ DriverManager
.. autoclass:: stevedore.driver.DriverManager
:members:
+ :show-inheritance:
HookManager
===========
.. autoclass:: stevedore.hook.HookManager
:members:
+ :inherited-members:
+ :show-inheritance:
NamedExtensionManager
=====================
.. autoclass:: stevedore.named.NamedExtensionManager
:members:
+ :show-inheritance:
EnabledExtensionManager
=======================
.. autoclass:: stevedore.enabled.EnabledExtensionManager
:members:
+ :inherited-members:
+ :show-inheritance:
ExtensionManager
================
.. autoclass:: stevedore.extension.ExtensionManager
:members:
+ :show-inheritance:
Extension
=========
.. autoclass:: stevedore.extension.Extension
:members:
+ :show-inheritance:
View
8 stevedore/extension.py
@@ -85,8 +85,8 @@ def map(self, func, *args, **kwds):
def func(ext, *args, **kwds):
pass
- The first argument to func(), 'ext', is the :class:`Extension`
- instance.
+ The first argument to func(), 'ext', is the
+ :class:`~stevedore.extension.Extension` instance.
Exceptions raised from within func() are logged and ignored.
@@ -96,12 +96,16 @@ def func(ext, *args, **kwds):
:returns: List of values returned from func()
"""
if not self.extensions:
+ # FIXME: Use a more specific exception class here.
raise RuntimeError('No %s extensions found' % self.namespace)
response = []
for e in self.extensions:
try:
response.append(func(e, *args, **kwds))
except Exception as err:
+ # FIXME: Provide an argument to control
+ # whether to ignore exceptions in each
+ # plugin or stop processing.
LOG.error('error calling %r: %s', e.name, err)
LOG.exception(err)
return response
View
2 stevedore/named.py
@@ -2,7 +2,7 @@
class NamedExtensionManager(EnabledExtensionManager):
- """ExtensionManager that only loads the named extensions.
+ """Loads only the named extensions.
This is useful for explictly enabling extensions in a
configuration file, for example.

0 comments on commit 33fe817

Please sign in to comment.