equal
deleted
inserted
replaced
196 |
196 |
197 def listen(self, state): |
197 def listen(self, state): |
198 if state != self.oldstate: |
198 if state != self.oldstate: |
199 action = {'Started': self.site.PLCStarted, |
199 action = {'Started': self.site.PLCStarted, |
200 'Stopped': self.site.PLCStopped}.get(state, None) |
200 'Stopped': self.site.PLCStopped}.get(state, None) |
201 if action is not None: action () |
201 if action is not None: |
|
202 action() |
202 self.oldstate = state |
203 self.oldstate = state |
203 |
204 |
204 |
205 |
205 def website_statuslistener_factory(site): |
206 def website_statuslistener_factory(site): |
206 return statuslistener(site).listen |
207 return statuslistener(site).listen |