summaryrefslogtreecommitdiff
path: root/src/daq/accesslog
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-10-12 20:40:59 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-10-12 20:40:59 +0200
commit8db3fd119bb267e9ae7ae1eb6b145741e922e2b1 (patch)
tree63714fa1b08bc9c19df28a13a19d7ae24e01827e /src/daq/accesslog
parentopen log file (diff)
improved error handling
Diffstat (limited to 'src/daq/accesslog')
-rwxr-xr-xsrc/daq/accesslog/sfive-accesslog.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/daq/accesslog/sfive-accesslog.py b/src/daq/accesslog/sfive-accesslog.py
index e07f22c..1337f1c 100755
--- a/src/daq/accesslog/sfive-accesslog.py
+++ b/src/daq/accesslog/sfive-accesslog.py
@@ -108,6 +108,11 @@ class AccessLog():
self._proto = None
self._conn = None
+ def run(self):
+ if self._initLog():
+ reactor.callWhenRunning(self._initSocket)
+ reactor.run()
+
def _initLog(self):
try:
self._fd = open(self._logfile, 'r')
@@ -117,11 +122,6 @@ class AccessLog():
return True
- def run(self):
- if self._initLog():
- reactor.callWhenRunning(self._initSocket)
- reactor.run()
-
def _initSocket(self):
print 'SFive: trying to connect to %s...' % (self._socket)
self._proto = SFiveProto(self)