--- a/Beremiz_service.py Wed Feb 25 14:00:11 2015 +0100
+++ b/Beremiz_service.py Fri Feb 27 00:40:44 2015 +0100
@@ -514,6 +514,7 @@
except Exception, e:
print "Nevow/Athena import failed :", e
webport = None
+ NS.WorkingDir = WorkingDir
if wampconf is not None :
try:
--- 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):