changeset 3147:c3e8ddf3a071

core (constants): use parent of "sat" module dir as last config path
author Goffi <goffi@goffi.org>
date Wed, 29 Jan 2020 19:28:08 +0100
parents 320b762cbdf0
children 60a9e47ef988
files sat/core/constants.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/core/constants.py	Wed Jan 29 19:21:16 2020 +0100
+++ b/sat/core/constants.py	Wed Jan 29 19:28:08 2020 +0100
@@ -453,7 +453,9 @@
         ]
     else:
         import os
-        root_dir = dirname(sat.__file__) + '/'
+        # we use parent of "sat" module dir as last config path, this is useful for
+        # per instance configurations (e.g. a dev instance and a main instance)
+        root_dir = dirname(dirname(sat.__file__)) + '/'
         Const.CONFIG_PATHS = (
             ["/etc/", "~/", "~/."]
             + [