diff sat/core/constants.py @ 3144:02325c3141dd

core (constants): parse `sat.conf` from `sat` module dir
author Goffi <goffi@goffi.org>
date Wed, 29 Jan 2020 19:05:41 +0100
parents 559a625a236b
children 3f414c897e70
line wrap: on
line diff
--- a/sat/core/constants.py	Wed Jan 29 18:54:40 2020 +0100
+++ b/sat/core/constants.py	Wed Jan 29 19:05:41 2020 +0100
@@ -23,6 +23,7 @@
 except ImportError:
     BaseDirectory = None
 import sat
+from pathlib import Path
 
 
 class Const(object):
@@ -452,8 +453,9 @@
         ]
     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))