mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#1259: Guard the debug output call when emitting events; to prevent the
repr() implementation of arbitrary objects causing build failures.
This commit is contained in:
parent
44418fd1a1
commit
f4a0a81f4c
2
CHANGES
2
CHANGES
@ -58,6 +58,8 @@ Bugs fixed
|
||||
* PR#146,#1172: Fix ZeroDivisionError in parallel builds. Thanks to tychoish.
|
||||
* #1206: Fix i18n: gettext did not translate admonition directive's title.
|
||||
* #1232: Sphinx generated broken ePub files on Windows.
|
||||
* #1259: Guard the debug output call when emitting events; to prevent the
|
||||
repr() implementation of arbitrary objects causing build failures.
|
||||
|
||||
|
||||
Release 1.2 beta1 (released Mar 31, 2013)
|
||||
|
@ -347,7 +347,11 @@ class Sphinx(object):
|
||||
event.pop(listener_id, None)
|
||||
|
||||
def emit(self, event, *args):
|
||||
self.debug2('[app] emitting event: %r%s', event, repr(args)[:100])
|
||||
try:
|
||||
self.debug2('[app] emitting event: %r%s', event, repr(args)[:100])
|
||||
except Exception: # not every object likes to be repr()'d (think
|
||||
# random stuff coming via autodoc)
|
||||
pass
|
||||
results = []
|
||||
if event in self._listeners:
|
||||
for _, callback in self._listeners[event].iteritems():
|
||||
|
Loading…
Reference in New Issue
Block a user