Commit 2a1c555d authored by Yusei Tahara's avatar Yusei Tahara

Fixed a bug which disable all subscribers includes existing ones.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25007 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 23dbb236
# -*- coding: UTF-8 -*-
# -*- coding: utf-8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
# Authors: Nik Kim <fafhrd@legco.biz>
__version__ = '$Revision: 1.3 $'[11:-2]
......@@ -9,7 +9,7 @@ from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
from OFS.PropertyManager import PropertyManager
from zLOG import LOG, INFO, ERROR
from zLOG import LOG, ERROR
from AccessControl import ClassSecurityInfo, Permissions
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
......@@ -54,11 +54,12 @@ class TimerService(SimpleItem):
def process_shutdown(self, phase, time_in_phase):
""" """
subscriptions = []
for path in self._subscribers:
try:
subscriptions = [self.unrestrictedTraverse(path)
for path in self._subscribers]
subscriptions.append(self.unrestrictedTraverse(path))
except KeyError:
pass
for subscriber in subscriptions:
process_shutdown = getattr(subscriber, 'process_shutdown', None)
if process_shutdown is not None:
......@@ -84,9 +85,9 @@ class TimerService(SimpleItem):
# Service start to 'ping' the portal before the zope transaction in
# which the portal is created is commited.
subscriptions = []
for path in self._subscribers:
try:
subscriptions = [self.unrestrictedTraverse(path)
for path in self._subscribers]
subscriptions.append(self.unrestrictedTraverse(path))
except KeyError:
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment