Replace appdirs by platformdirs

appdirs was deprecated[1] and now platformdirs is the recommended
replacement.

[1] 8734277956

Change-Id: I39a1041c07fc9ab0e41fcd75ab32bf1348394553
This commit is contained in:
Takashi Kajinami 2024-03-30 02:38:41 +09:00
parent 113ba244f8
commit 019b83767a
2 changed files with 5 additions and 4 deletions

View File

@ -13,10 +13,10 @@
import copy
import os
import appdirs
import jsonschema
import logging
import pbr.version
import platformdirs
import yaml
from os_faults.ansible import executor
@ -38,11 +38,12 @@ def get_release():
return pbr.version.VersionInfo('os_faults').release_string()
APPDIRS = appdirs.AppDirs(appname='openstack', appauthor='OpenStack')
PLATFORMDIRS = platformdirs.PlatformDirs(appname='openstack',
appauthor='OpenStack')
UNIX_SITE_CONFIG_HOME = '/etc/openstack'
CONFIG_SEARCH_PATH = [
os.getcwd(),
APPDIRS.user_config_dir,
PLATFORMDIRS.user_config_dir,
UNIX_SITE_CONFIG_HOME,
]
CONFIG_FILES = [

View File

@ -4,7 +4,7 @@
pbr>=2.0.0 # Apache-2.0
appdirs>=1.3.0 # MIT License
platformdirs>=3 # MIT License
click>=6.7 # BSD
iso8601>=0.1.11 # MIT
jsonschema>=2.6.0 # MIT