move fixbot.logwatch.logwatch to fixbot.logwatch
authorTero Marttila <terom@fixme.fi>
Thu, 04 Feb 2010 20:14:22 +0200
changeset 47 81b37185209c
parent 46 ee58a22e5baa
child 48 ba101beeb062
move fixbot.logwatch.logwatch to fixbot.logwatch
fixbot/logwatch/__init__.py
fixbot/logwatch/logwatch.py
twisted/plugins/fixbot_logwatch_plugin.py
--- a/fixbot/logwatch/__init__.py	Thu Feb 04 20:11:36 2010 +0200
+++ b/fixbot/logwatch/__init__.py	Thu Feb 04 20:14:22 2010 +0200
@@ -0,0 +1,31 @@
+from fixbot import api
+
+class LogWatchModule (api.Module) :
+    name = "logs"
+    
+    event_types = [
+        "error",
+        "sudo",
+        "ssh",
+        "all"
+    ]
+
+    def __init__ (self, config) :
+        """
+            Initialize with logwatch_sources from config
+        """
+
+        super(LogWatchModule, self).__init__(config)
+
+        self.sources = config['logwatch-sources']
+    
+    def handleConnect (self) :
+        for source in self.sources :
+            source.setModule(self)
+    
+    def error (self, msg) :
+        self.sendEvent("error", msg)
+
+def makeService (config) :
+    return api.makeService(LogWatchModule, config)
+
--- a/fixbot/logwatch/logwatch.py	Thu Feb 04 20:11:36 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-from twisted.internet import protocol, reactor
-from twisted.python import log
-import sys
-
-from fixbot import api
-
-class LogWatchModule (api.Module) :
-    name = "logs"
-    version = 0x0005
-    
-    event_types = [
-        "error",
-        "sudo",
-        "ssh",
-        "all"
-    ]
-
-    def __init__ (self, config) :
-        """
-            Initialize with logwatch_sources from config
-        """
-
-        super(LogWatchModule, self).__init__(config)
-
-        self.sources = config['logwatch-sources']
-    
-    def handleConnect (self) :
-        for source in self.sources :
-            source.setModule(self)
-    
-    def error (self, msg) :
-        self.sendEvent("error", msg)
-
-def makeService (config) :
-    return api.makeService(LogWatchModule, config)
-
--- a/twisted/plugins/fixbot_logwatch_plugin.py	Thu Feb 04 20:11:36 2010 +0200
+++ b/twisted/plugins/fixbot_logwatch_plugin.py	Thu Feb 04 20:14:22 2010 +0200
@@ -7,7 +7,7 @@
 from twisted.application import internet
 
 from fixbot import api
-from fixbot.logwatch import logwatch
+from fixbot import logwatch
 
 class LogwatchOptions (api.ClientOptions) :
     optParameters = [