core (constants): parse sat.conf from sat module dir
This commit is contained in:
parent
4cb56362ec
commit
7f2c6cd8a6
1 changed files with 3 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
BaseDirectory = None
|
BaseDirectory = None
|
||||||
import sat
|
import sat
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
class Const(object):
|
class Const(object):
|
||||||
|
|
@ -452,8 +453,9 @@ if (
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
import os
|
import os
|
||||||
|
root_dir = Path(sat.__file__).parent
|
||||||
Const.CONFIG_PATHS = (
|
Const.CONFIG_PATHS = (
|
||||||
["/etc/", "~/", "~/.", "", "."]
|
["/etc/", "~/", "~/.", "", root_dir, "."]
|
||||||
+ [
|
+ [
|
||||||
"%s/" % path
|
"%s/" % path
|
||||||
for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE))
|
for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue