comparison libervia/backend/plugins/plugin_xep_0115.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
comparison
equal deleted inserted replaced
4269:64a85ce8be70 4270:0d7bb4df2343
168 if c_hash != "sha-1": # unknown hash method 168 if c_hash != "sha-1": # unknown hash method
169 log.warning( 169 log.warning(
170 _( 170 _(
171 "Unknown hash method for entity capabilities: [{hash_method}] " 171 "Unknown hash method for entity capabilities: [{hash_method}] "
172 "(entity: {entity_jid}, node: {node})" 172 "(entity: {entity_jid}, node: {node})"
173 ) 173 ).format(hash_method=c_hash, entity_jid=from_jid, node=c_node)
174 .format(hash_method = c_hash, entity_jid = from_jid, node = c_node)
175 ) 174 )
176 175
177 def cb(__): 176 def cb(__):
178 computed_hash = self.host.memory.get_entity_datum( 177 computed_hash = self.host.memory.get_entity_datum(
179 self.client, from_jid, C.ENTITY_CAP_HASH 178 self.client, from_jid, C.ENTITY_CAP_HASH
184 "Computed hash differ from given hash:\n" 183 "Computed hash differ from given hash:\n"
185 "given: [{given}]\n" 184 "given: [{given}]\n"
186 "computed: [{computed}]\n" 185 "computed: [{computed}]\n"
187 "(entity: {entity_jid}, node: {node})" 186 "(entity: {entity_jid}, node: {node})"
188 ).format( 187 ).format(
189 given = c_ver, 188 given=c_ver,
190 computed = computed_hash, 189 computed=computed_hash,
191 entity_jid = from_jid, 190 entity_jid=from_jid,
192 node = c_node, 191 node=c_node,
193 ) 192 )
194 ) 193 )
195 194
196 def eb(failure): 195 def eb(failure):
197 if isinstance(failure.value, error.ConnectionDone): 196 if isinstance(failure.value, error.ConnectionDone):