From d41bfa1c5761e7d23351b8892d448c0e242bbeb2 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 4 Jul 2018 12:44:55 +0200 Subject: Replace config.CACHE_DIR with xdg.CACHE_HOME. --- poezio/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'poezio/connection.py') diff --git a/poezio/connection.py b/poezio/connection.py index c97365f8..0cbff1a5 100644 --- a/poezio/connection.py +++ b/poezio/connection.py @@ -25,8 +25,9 @@ from slixmpp.util import FileSystemCache from poezio import common from poezio import fixes +from poezio import xdg from poezio.common import safeJID -from poezio.config import config, options, CACHE_DIR +from poezio.config import config, options class Connection(slixmpp.ClientXMPP): @@ -120,7 +121,7 @@ class Connection(slixmpp.ClientXMPP): # Must be loaded before 0030. self.register_plugin('xep_0115', { 'caps_node': 'https://poez.io', - 'cache': FileSystemCache(CACHE_DIR, 'caps', encode=str, + 'cache': FileSystemCache(xdg.CACHE_HOME, 'caps', encode=str, decode=lambda x: DiscoInfo(ET.fromstring(x))), }) self.register_plugin('xep_0030') -- cgit v1.2.3