Mercurial > libervia-backend
comparison sat/core/constants.py @ 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 | 343b8076e967 |
comparison
equal
deleted
inserted
replaced
3146:320b762cbdf0 | 3147:c3e8ddf3a071 |
---|---|
451 + Const.APP_NAME_FILE | 451 + Const.APP_NAME_FILE |
452 + ".conf" | 452 + ".conf" |
453 ] | 453 ] |
454 else: | 454 else: |
455 import os | 455 import os |
456 root_dir = dirname(sat.__file__) + '/' | 456 # we use parent of "sat" module dir as last config path, this is useful for |
457 # per instance configurations (e.g. a dev instance and a main instance) | |
458 root_dir = dirname(dirname(sat.__file__)) + '/' | |
457 Const.CONFIG_PATHS = ( | 459 Const.CONFIG_PATHS = ( |
458 ["/etc/", "~/", "~/."] | 460 ["/etc/", "~/", "~/."] |
459 + [ | 461 + [ |
460 "%s/" % path | 462 "%s/" % path |
461 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE)) | 463 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE)) |