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:
parent
113ba244f8
commit
019b83767a
@ -13,10 +13,10 @@
|
|||||||
import copy
|
import copy
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import appdirs
|
|
||||||
import jsonschema
|
import jsonschema
|
||||||
import logging
|
import logging
|
||||||
import pbr.version
|
import pbr.version
|
||||||
|
import platformdirs
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from os_faults.ansible import executor
|
from os_faults.ansible import executor
|
||||||
@ -38,11 +38,12 @@ def get_release():
|
|||||||
return pbr.version.VersionInfo('os_faults').release_string()
|
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'
|
UNIX_SITE_CONFIG_HOME = '/etc/openstack'
|
||||||
CONFIG_SEARCH_PATH = [
|
CONFIG_SEARCH_PATH = [
|
||||||
os.getcwd(),
|
os.getcwd(),
|
||||||
APPDIRS.user_config_dir,
|
PLATFORMDIRS.user_config_dir,
|
||||||
UNIX_SITE_CONFIG_HOME,
|
UNIX_SITE_CONFIG_HOME,
|
||||||
]
|
]
|
||||||
CONFIG_FILES = [
|
CONFIG_FILES = [
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
pbr>=2.0.0 # Apache-2.0
|
pbr>=2.0.0 # Apache-2.0
|
||||||
|
|
||||||
appdirs>=1.3.0 # MIT License
|
platformdirs>=3 # MIT License
|
||||||
click>=6.7 # BSD
|
click>=6.7 # BSD
|
||||||
iso8601>=0.1.11 # MIT
|
iso8601>=0.1.11 # MIT
|
||||||
jsonschema>=2.6.0 # MIT
|
jsonschema>=2.6.0 # MIT
|
||||||
|
Loading…
Reference in New Issue
Block a user