-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 16.10.2010 22:00, schrieb Luc Saffre:
> Here is a little patch I suggest for autodoc.
> 
> In :file:`sphinx/ext/autodoc.py` line 332
> (meth:`Documenter.import.object`), add 2 lines::
> 
>         except Exception, err:
>             if self.env.app.warningiserror:  # ADDED
>                 raise                        # ADDED
>             self.directive.warn(
>                 'autodoc can\'t import/find %s %r, it reported error: '
>                 '"%s", please check your spelling and sys.path' %
>                 (self.objtype, str(self.fullname), err))
>             return False
> 
> This is about when a module you are autodocumenting fails to import.
> Sphinx's or autodoc's usual behaviour is to just issue a one-line
> warning. That's perfect. When sphinx-build was called with `-W` then the
> warning causes it to stop. That's also perfect. I just would like it to
> stop with a traceback and not with a single warning line.

I've now implemented a similar change: the traceback is always shown, except
if the "quiet" option is given to Sphinx.

Also, documents containing auto-directives that fail on import are now
always re-read on next build.

Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk0m2zAACgkQN9GcIYhpnLAbRACgkhnyWBsxb0bEBb76KT0KmHxH
I50Anj0kr4wf3fct5hP/TeXh1B0DOYMK
=AEV+
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to