Mercurial > libervia-web
diff libervia.py @ 274:886b47896f3c
browser_side: better PEP8 compliance
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 21 Nov 2013 16:05:14 +0100 |
parents | 9eb9c7d41bdc |
children | a763b2ac5d41 |
line wrap: on
line diff
--- a/libervia.py Thu Nov 21 16:03:33 2013 +0100 +++ b/libervia.py Thu Nov 21 16:05:14 2013 +0100 @@ -136,15 +136,14 @@ self.retry_delay = self.RETRY_BASE_DELAY LiberviaJsonProxy.onRemoteResponse(self, response, request_info) - def onRemoteError(self, code, errobj, request_info): if errobj['message'] == 'Empty Response': - Window.getLocation().reload() # XXX: reset page in case of session ended. - # FIXME: Should be done more properly without hard reload + Window.getLocation().reload() # XXX: reset page in case of session ended. + # FIXME: Should be done more properly without hard reload LiberviaJsonProxy.onRemoteError(self, code, errobj, request_info) #we now try to reconnect - if isinstance(errobj['message'],dict) and errobj['message']['faultCode']==0: - Window.alert('You are not allowed to connect to server') + if isinstance(errobj['message'], dict) and errobj['message']['faultCode'] == 0: + Window.alert('You are not allowed to connect to server') else: def _timerCb(): self.host.bridge_signals.call('getSignals', self.host._getSignalsCB) @@ -168,10 +167,10 @@ self.discuss_panel = self.panel.discuss_panel self.tab_panel = self.panel.tab_panel self.tab_panel.addTabListener(self) - self.libervia_widgets = set() #keep track of all actives LiberviaWidgets self.room_list = set() #set of rooms - self.mblog_cache = [] #used to keep our own blog entries in memory, to show them in new mblog panel - self.avatars_cache = {} #keep track of jid's avatar hash (key=jid, value=file) + self.libervia_widgets = set() # keep track of all actives LiberviaWidgets + self.mblog_cache = [] # used to keep our own blog entries in memory, to show them in new mblog panel + self.avatars_cache = {} # keep track of jid's avatar hash (key=jid, value=file) self.current_action_ids = set() #self.discuss_panel.addWidget(panels.EmptyPanel(self)) self.discuss_panel.addWidget(panels.MicroblogPanel(self, []))