From e53840355a64dacea94651049ff27a554fac2610 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Tue, 10 Mar 2015 09:40:18 +0000 Subject: [PATCH] put all abstract methods together --- kippo/core/output.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kippo/core/output.py b/kippo/core/output.py index 3668e96..78dd056 100644 --- a/kippo/core/output.py +++ b/kippo/core/output.py @@ -74,8 +74,6 @@ class Output(object): # return self.emit( msg ) # elif isinstance( msg, str ): # return self.emit( { 'message':msg, 'sessionid':sessionid } ) - - # used when the HoneypotTransport prefix is not available. def logDispatch(self, *msg, **kw): ev = kw ev['message'] = msg @@ -91,6 +89,11 @@ class Output(object): """Abstract method to shut down output plugin""" pass + @abc.abstractmethod + def handleLog( self, session, event ): + """Handle a general event within the output plugin""" + pass + # this is the main emit() hook that gets called by the the Twisted logging def emit(self, event): # ignore stdout and stderr in output plugins @@ -139,9 +142,4 @@ class Output(object): self.handleLog( self.sessions[sessionno], ev ) # print "error calling handleLog for event %s" % repr(ev) - @abc.abstractmethod - def handleLog( self, session, event ): - """Handle a general event within the output plugin""" - pass - # vim: set sw=4 et: