diff browser_side/jid.py @ 274:886b47896f3c

browser_side: better PEP8 compliance
author souliane <souliane@mailoo.org>
date Thu, 21 Nov 2013 16:05:14 +0100
parents 9763dec220ed
children 6ce8515ee8f5
line wrap: on
line diff
--- a/browser_side/jid.py	Thu Nov 21 16:03:33 2013 +0100
+++ b/browser_side/jid.py	Thu Nov 21 16:05:14 2013 +0100
@@ -20,8 +20,7 @@
 """
 
 
-
-class JID:
+class JID(object):
     """This class help manage JID (Node@Domaine/Resource)"""
 
     def __init__(self, jid):
@@ -30,19 +29,19 @@
 
     def __parse(self):
         """find node domaine and resource"""
-        node_end=self.__raw.find('@')
-        if node_end<0:
-            node_end=0
-        domain_end=self.__raw.find('/')
-        if domain_end<1:
-            domain_end=len(self.__raw)
-        self.node=self.__raw[:node_end]
-        self.domain=self.__raw[(node_end+1) if node_end else 0:domain_end]
-        self.resource=self.__raw[domain_end+1:]
+        node_end = self.__raw.find('@')
+        if node_end < 0:
+            node_end = 0
+        domain_end = self.__raw.find('/')
+        if domain_end < 1:
+            domain_end = len(self.__raw)
+        self.node = self.__raw[:node_end]
+        self.domain = self.__raw[(node_end + 1) if node_end else 0:domain_end]
+        self.resource = self.__raw[domain_end + 1:]
         if not node_end:
-            self.bare=self.__raw
+            self.bare = self.__raw
         else:
-            self.bare=self.node+'@'+self.domain
+            self.bare = self.node + '@' + self.domain
 
     def __str__(self):
         return self.__raw.__str__()