From 62481f13295ad6b96648e608d4d93029864c8eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 21 Aug 2022 22:54:52 +0200 Subject: roezio: migrate poezio/xdg.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'poezio/config.py') diff --git a/poezio/config.py b/poezio/config.py index 4eb43cad..0a86ac8a 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -19,7 +19,7 @@ from configparser import RawConfigParser, NoOptionError, NoSectionError from pathlib import Path from typing import Dict, List, Optional, Union, Tuple, cast, Any -from poezio import xdg +from poezio.libpoezio import XDG from slixmpp import JID, InvalidJID log = logging.getLogger(__name__) # type: logging.Logger @@ -603,7 +603,7 @@ def get_image_cache() -> Optional[Path]: tmp_dir = config.getstr('tmp_image_dir') if tmp_dir: return Path(tmp_dir) - return xdg.CACHE_HOME / 'images' + return XDG.cache_dir / 'images' def check_config(): @@ -656,7 +656,7 @@ def setup_logging(debug_file=''): "Change the logging config according to the cmdline options and config" global LOG_DIR LOG_DIR = config.get('log_dir') - LOG_DIR = Path(LOG_DIR).expanduser() if LOG_DIR else xdg.DATA_HOME / 'logs' + LOG_DIR = Path(LOG_DIR).expanduser() if LOG_DIR else XDG.data_dir / 'logs' from copy import deepcopy logging_config = deepcopy(LOGGING_CONFIG) if config.get('log_errors'): -- cgit v1.2.3