diff sat/plugins/plugin_xep_0115.py @ 2830:770ec685ff1f

core (disco): added missing disco extensions when generating the cap hash.
author Goffi <goffi@goffi.org>
date Fri, 01 Mar 2019 19:28:11 +0100
parents 003b8b4b56a7
children ab2696e34d29
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0115.py	Fri Mar 01 17:42:28 2019 +0100
+++ b/sat/plugins/plugin_xep_0115.py	Fri Mar 01 19:28:11 2019 +0100
@@ -165,9 +165,10 @@
         if c_hash != "sha-1":  # unknown hash method
             log.warning(
                 _(
-                    u"Unknown hash method for entity capabilities: [%(hash_method)s] (entity: %(jid)s, node: %(node)s)"
+                    u"Unknown hash method for entity capabilities: [{hash_method}] "
+                    u"(entity: {entity_jid}, node: {node})"
                 )
-                % {"hash_method": c_hash, "jid": from_jid, "node": c_node}
+                .format(hash_method = c_hash, entity_jid = from_jid, node = c_node)
             )
 
         def cb(__):
@@ -177,14 +178,16 @@
             if computed_hash != c_ver:
                 log.warning(
                     _(
-                        u"Computed hash differ from given hash:\ngiven: [%(given_hash)s]\ncomputed: [%(computed_hash)s]\n(entity: %(jid)s, node: %(node)s)"
+                        u"Computed hash differ from given hash:\n"
+                        u"given: [{given}]\n"
+                        u"computed: [{computed}]\n"
+                        u"(entity: {entity_jid}, node: {node})"
+                    ).format(
+                        given = c_ver,
+                        computed = computed_hash,
+                        entity_jid = from_jid,
+                        node = c_node,
                     )
-                    % {
-                        "given_hash": c_ver,
-                        "computed_hash": computed_hash,
-                        "jid": from_jid,
-                        "node": c_node,
-                    }
                 )
 
         def eb(failure):