Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-09-05 22:13:00 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-09-05 22:13:58 +0300
commit63d72fbdefa46f00951f7154a236a3c600ad9f07 (patch)
tree3e5d9d5a3f43591e5b1016c9ae7fa58e3fad9ad4 /nbxmpp/modules/http_auth.py
parente57118fd4a8a1b53cb1fc42a7d4253078e5d55e0 (diff)
HTTPAuth: Parse attrs correctly
Fixes #84
Diffstat (limited to 'nbxmpp/modules/http_auth.py')
-rw-r--r--nbxmpp/modules/http_auth.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/nbxmpp/modules/http_auth.py b/nbxmpp/modules/http_auth.py
index df8ac1f..fb78c46 100644
--- a/nbxmpp/modules/http_auth.py
+++ b/nbxmpp/modules/http_auth.py
@@ -45,7 +45,10 @@ class HTTPAuth:
if confirm is None:
return
- http_auth = confirm.getAttrs().copy()
- http_auth['body'] = stanza.getTagData('body')
- properties.http_auth = HTTPAuthData(**http_auth)
- log.info('Found data: %s', http_auth)
+ attrs = confirm.getAttrs()
+ body = stanza.getTagData('body')
+ id_ = attrs.get('id')
+ method = attrs.get('method')
+ url = attrs.get('url')
+ properties.http_auth = HTTPAuthData(id_, method, url, body)
+ log.info('HTTPAuth received: %s %s %s %s', id_, method, url, body)