summaryrefslogtreecommitdiff
path: root/poezio/connection.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-07-21 17:09:52 +0200
committermathieui <mathieui@mathieui.net>2018-07-21 17:09:52 +0200
commitea2d76864da2448152428a62fe5c7daaea6ab0d3 (patch)
tree7ac279bb9b1efbe6025a0435d4a121f11080fcb0 /poezio/connection.py
parent3ec153a6a01faca5445bb7c21e0d427bb5096320 (diff)
downloadpoezio-ea2d76864da2448152428a62fe5c7daaea6ab0d3.tar.gz
poezio-ea2d76864da2448152428a62fe5c7daaea6ab0d3.tar.bz2
poezio-ea2d76864da2448152428a62fe5c7daaea6ab0d3.tar.xz
poezio-ea2d76864da2448152428a62fe5c7daaea6ab0d3.zip
yapf -rip
Diffstat (limited to 'poezio/connection.py')
-rw-r--r--poezio/connection.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/poezio/connection.py b/poezio/connection.py
index aba4a2f0..57254069 100644
--- a/poezio/connection.py
+++ b/poezio/connection.py
@@ -82,7 +82,9 @@ class Connection(slixmpp.ClientXMPP):
jid = config.get('server')
password = None
jid = safeJID(jid)
- jid.resource = '%s-%s' % (jid.resource, device_id) if jid.resource else 'poezio-%s' % device_id
+ jid.resource = '%s-%s' % (
+ jid.resource,
+ device_id) if jid.resource else 'poezio-%s' % device_id
# TODO: use the system language
slixmpp.ClientXMPP.__init__(
self, jid, password, lang=config.get('lang'))
@@ -108,8 +110,9 @@ class Connection(slixmpp.ClientXMPP):
self.auto_authorize = None
# prosody defaults, lowest is AES128-SHA, it should be a minimum
# for anything that came out after 2002
- self.ciphers = config.get('ciphers', 'HIGH+kEDH:HIGH+kEECDH:HIGH:!PSK'
- ':!SRP:!3DES:!aNULL')
+ self.ciphers = config.get(
+ 'ciphers', 'HIGH+kEDH:HIGH+kEECDH:HIGH:!PSK'
+ ':!SRP:!3DES:!aNULL')
self.ca_certs = config.get('ca_cert_path') or None
interval = config.get('whitespace_interval')
if int(interval) > 0:
@@ -119,11 +122,17 @@ class Connection(slixmpp.ClientXMPP):
self.register_plugin('xep_0004')
self.register_plugin('xep_0012')
# Must be loaded before 0030.
- self.register_plugin('xep_0115', {
- 'caps_node': 'https://poez.io',
- 'cache': FileSystemCache(str(xdg.CACHE_HOME), 'caps', encode=str,
- decode=lambda x: DiscoInfo(ET.fromstring(x))),
- })
+ self.register_plugin(
+ 'xep_0115', {
+ 'caps_node':
+ 'https://poez.io',
+ 'cache':
+ FileSystemCache(
+ str(xdg.CACHE_HOME),
+ 'caps',
+ encode=str,
+ decode=lambda x: DiscoInfo(ET.fromstring(x))),
+ })
self.register_plugin('xep_0030')
self.register_plugin('xep_0045')
self.register_plugin('xep_0048')