cc-4105: workaround for fix for terrible bug

This commit is contained in:
Rudi Grinberg 2012-08-10 13:16:10 -04:00
parent 9015b93527
commit 0e2d523bf6
4 changed files with 31 additions and 13 deletions

View file

@ -14,11 +14,22 @@ class Organizer(ReportHandler,Loggable):
pyinotify. (These events are fed to it through StoreWatchListener)
"""
_instance = None
def __new__(cls, channel, target_path, recorded_path):
if cls._instance:
cls._instance.channel = channel
cls._instance.target_path = target_path
cls._instance.recorded_path = recorded_path
else:
cls._instance = super(Organizer, cls).__new__( cls, channel,
target_path, recorded_path)
return cls._instance
def __init__(self, channel, target_path, recorded_path):
self.channel = channel
self.target_path = target_path
self.recorded_path = recorded_path
super(Organizer, self).__init__(signal=self.channel, weak=True)
super(Organizer, self).__init__(signal=self.channel, weak=False)
def handle(self, sender, event):
"""