diff src/plugins/plugin_xep_0020.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_xep_0020.py	Mon Jan 21 00:59:50 2013 +0100
+++ b/src/plugins/plugin_xep_0020.py	Fri Jan 18 17:55:35 2013 +0100
@@ -35,15 +35,16 @@
 NS_FEATURE_NEG = 'http://jabber.org/protocol/feature-neg'
 
 PLUGIN_INFO = {
-"name": "XEP 0020 Plugin",
-"import_name": "XEP-0020",
-"type": "XEP",
-"protocols": ["XEP-0020"],
-"main": "XEP_0020",
-"handler": "yes",
-"description": _("""Implementation of Feature Negotiation""")
+    "name": "XEP 0020 Plugin",
+    "import_name": "XEP-0020",
+    "type": "XEP",
+    "protocols": ["XEP-0020"],
+    "main": "XEP_0020",
+    "handler": "yes",
+    "description": _("""Implementation of Feature Negotiation""")
 }
 
+
 class XEP_0020(object):
 
     def __init__(self, host):
@@ -67,7 +68,7 @@
         for field in form.fields:
             values = form.fields[field].values
             result[field] = values[0] if values else None
-            if len(values)>1:
+            if len(values) > 1:
                 warning(_("More than one value choosed for %s, keeping the first one") % field)
         return result
 
@@ -92,7 +93,7 @@
         feature_elt.addChild(x_form.toElement())
         return feature_elt
 
-    def proposeFeatures(self, options_dict, namespace = None):
+    def proposeFeatures(self, options_dict, namespace=None):
         """Build a feature element with options to propose
         @param options_dict: dict with feature as key and list of acceptable options as value
         @param namespace: feature namespace"""
@@ -104,6 +105,7 @@
         feature_elt.addChild(x_form.toElement())
         return feature_elt
 
+
 class XEP_0020_handler(XMPPHandler):
     implements(iwokkel.IDisco)
 
@@ -112,4 +114,3 @@
 
     def getDiscoItems(self, requestor, target, nodeIdentifier=''):
         return []
-