From 8db3fd119bb267e9ae7ae1eb6b145741e922e2b1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 12 Oct 2014 20:40:59 +0200 Subject: improved error handling --- src/daq/accesslog/sfive-accesslog.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/daq/accesslog/sfive-accesslog.py') 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) -- cgit v1.2.3