Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
8c4bbc69 by Philipp Hörist at 2020-01-26T21:11:12+01:00
OMEMO: Make return value consistent for request_devicelist()

Always return a list instead of in some cases None

Fixes #96

- - - - -


1 changed file:

- nbxmpp/modules/omemo.py


Changes:

=====================================
nbxmpp/modules/omemo.py
=====================================
@@ -173,7 +173,7 @@ class OMEMO:
             raise StanzaMalformed('No list node found')
 
         if not list_node.getChildren():
-            return None
+            return []
 
         result = []
         devices_nodes = list_node.getChildren()
@@ -210,7 +210,7 @@ class OMEMO:
         items_node = pubsub_node.getTag('items')
         item = items_node.getTag('item')
         if item is None:
-            return None
+            return []
 
         try:
             return self._parse_devicelist(item)



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

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/commit/8c4bbc694a75cc708ddae6890cf4dad5f86f5377
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to