From 7f2c6cd8a6d5d1512f7a33d4e0ffa489187f1f68 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 29 Jan 2020 19:05:41 +0100 Subject: [PATCH] core (constants): parse `sat.conf` from `sat` module dir --- sat/core/constants.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sat/core/constants.py b/sat/core/constants.py index 38bbe463..15bc5cdd 100644 --- a/sat/core/constants.py +++ b/sat/core/constants.py @@ -23,6 +23,7 @@ try: except ImportError: BaseDirectory = None import sat +from pathlib import Path class Const(object): @@ -452,8 +453,9 @@ if ( ] else: import os + root_dir = Path(sat.__file__).parent Const.CONFIG_PATHS = ( - ["/etc/", "~/", "~/.", "", "."] + ["/etc/", "~/", "~/.", "", root_dir, "."] + [ "%s/" % path for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE))