Yann Leboulanger pushed to branch master at gajim / python-nbxmpp

Commits:
ece9faec by Yann Leboulanger at 2018-04-08T14:16:51+02:00
Improve coding style. Fixes gajim/gajim#8366

- - - - -


1 changed file:

- nbxmpp/features_nb.py


Changes:

=====================================
nbxmpp/features_nb.py
=====================================
--- a/nbxmpp/features_nb.py
+++ b/nbxmpp/features_nb.py
@@ -132,14 +132,14 @@ def getPrivacyLists(disp):
     def _on_response(resp):
         dict_ = {'lists': []}
         if not isResultNode(resp):
-            disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, (False))
+            disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, False)
             return
         for list_ in resp.getQueryPayload():
             if list_.getName()=='list':
                 dict_['lists'].append(list_.getAttr('name'))
             else:
                 dict_[list_.getName()]=list_.getAttr('name')
-        disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, (dict_))
+        disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, dict_)
     disp.SendAndCallForResponse(iq, _on_response)
 
 def getActiveAndDefaultPrivacyLists(disp):
@@ -147,14 +147,14 @@ def getActiveAndDefaultPrivacyLists(disp):
     def _on_response(resp):
         dict_ = {'active': '', 'default': ''}
         if not isResultNode(resp):
-            disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, (False))
+            disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, False)
             return
         for list_ in resp.getQueryPayload():
             if list_.getName() == 'active':
                 dict_['active'] = list_.getAttr('name')
             elif list_.getName() == 'default':
                 dict_['default'] = list_.getAttr('name')
-        disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, (dict_))
+        disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, dict_)
     disp.SendAndCallForResponse(iq, _on_response)
 
 def getPrivacyList(disp, listname):
@@ -164,9 +164,9 @@ def getPrivacyList(disp, listname):
     """
     def _on_response(resp):
         if not isResultNode(resp):
-            disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, (False))
+            disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, False)
             return
-        disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, (resp))
+        disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, resp)
     iq = Iq('get', NS_PRIVACY, payload=[Node('list', {'name': listname})])
     disp.SendAndCallForResponse(iq, _on_response)
 



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/commit/ece9faec6857562c85b671f6214cd7c45c2221cc

---
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/commit/ece9faec6857562c85b671f6214cd7c45c2221cc
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to