diff src/plugins/plugin_misc_xmllog.py @ 594:e629371a28d3

Fix pep8 support in src/plugins.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 18 Jan 2013 17:55:35 +0100
parents beaf6bec2fcd
children 84a6e83157c2
line wrap: on
line diff
--- a/src/plugins/plugin_misc_xmllog.py	Mon Jan 21 00:59:50 2013 +0100
+++ b/src/plugins/plugin_misc_xmllog.py	Fri Jan 18 17:55:35 2013 +0100
@@ -24,24 +24,25 @@
 from twisted.words.xish import domish
 
 PLUGIN_INFO = {
-"name": "Raw XML log Plugin",
-"import_name": "XmlLog",
-"type": "Misc",
-"protocols": [],
-"dependencies": [],
-"main": "XmlLog",
-"handler": "no",
-"description": _("""Send raw XML logs to bridge""")
+    "name": "Raw XML log Plugin",
+    "import_name": "XmlLog",
+    "type": "Misc",
+    "protocols": [],
+    "dependencies": [],
+    "main": "XmlLog",
+    "handler": "no",
+    "description": _("""Send raw XML logs to bridge""")
 }
 
+
 class LoggingXmlStream(XmlStream):
     """This class send the raw XML to the Bridge, for logging purpose"""
 
     def send(self, obj):
-        if isinstance(obj,basestring):
-            log=unicode(obj)
+        if isinstance(obj, basestring):
+            log = unicode(obj)
         elif isinstance(obj, domish.Element):
-            log=obj.toXml()
+            log = obj.toXml()
         else:
             error(_('INTERNAL ERROR: Unmanaged XML type'))
         self._host.bridge.xmlLog("OUT", log, self._profile)
@@ -72,7 +73,7 @@
         host.memory.importParams(self.params)
 
         #bridge
-        host.bridge.addSignal("xmlLog", ".plugin", signature='sss') #args: direction("IN" or "OUT"), xml_data, profile
+        host.bridge.addSignal("xmlLog", ".plugin", signature='sss')  # args: direction("IN" or "OUT"), xml_data, profile
 
         do_log = self.host.memory.getParamA("Xml log", "Debug")
         if do_log: