Remove handlers after director run.
This commit is contained in:
parent
11ee049b4d
commit
ac2ca54570
2 changed files with 6 additions and 0 deletions
|
@ -177,6 +177,7 @@ def getComics(options):
|
||||||
finish()
|
finish()
|
||||||
finally:
|
finally:
|
||||||
events.getHandler().end()
|
events.getHandler().end()
|
||||||
|
events.clear_handlers()
|
||||||
return errors
|
return errors
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -328,6 +328,7 @@ def getHandlerNames():
|
||||||
return sorted(_handler_classes.keys())
|
return sorted(_handler_classes.keys())
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME: Hidden singleton :(
|
||||||
_handlers = []
|
_handlers = []
|
||||||
|
|
||||||
|
|
||||||
|
@ -338,6 +339,10 @@ def addHandler(name, basepath=None, baseurl=None, allowDownscale=False):
|
||||||
_handlers.append(_handler_classes[name](basepath, baseurl, allowDownscale))
|
_handlers.append(_handler_classes[name](basepath, baseurl, allowDownscale))
|
||||||
|
|
||||||
|
|
||||||
|
def clear_handlers():
|
||||||
|
del _handlers[:]
|
||||||
|
|
||||||
|
|
||||||
class MultiHandler(object):
|
class MultiHandler(object):
|
||||||
"""Encapsulate a list of handlers."""
|
"""Encapsulate a list of handlers."""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue