runtime/NevowServer.py
changeset 1453 f31353cac197
parent 1439 a68cd4253259
child 1511 91538d0c242c
--- a/runtime/NevowServer.py	Wed Feb 25 14:00:11 2015 +0100
+++ b/runtime/NevowServer.py	Fri Feb 27 00:40:44 2015 +0100
@@ -9,6 +9,8 @@
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 '''
 
+WorkingDir = None
+
 class PLCHMI(athena.LiveElement):
 
     initialised = False
@@ -162,8 +164,9 @@
 
     def listen(self, state):
         if state != self.oldstate:
-            {'Started': self.site.PLCStarted,
-            'Stopped': self.site.PLCStopped}[state]()
+            action = {'Started': self.site.PLCStarted,
+                      'Stopped': self.site.PLCStopped}.get(state, None)
+            if action is not None: action ()
             self.oldstate = state
 
 def website_statuslistener_factory(site):