Weird gettext bug, possible fix.

10 views
Skip to first unread message

Jonathan Harker

unread,
Oct 24, 2016, 10:47:56 PM10/24/16
to sphinx-dev
When running:

  sphinx-build -b gettext ...

MessageCatalogBuilder.finish() calls osutil.canon_path() which throws an AttributeError when its argument is None. The os_path() function will also fail the same way, and there are no tests for osutil.py to pick this up. See #3093

I've got a patch that can band-aid these functions to not fail with an error on something that's basically cosmetic, but I'm concerned that it's just hiding another bug somewhere else that is returning None for the source filename and line numbers for some of the translation strings. This happens with strings that are :alt: parameters of .. image:: directives.

Reply all
Reply to author
Forward
0 new messages