comparison sat/core/constants.py @ 3379:9081b6c41328

core: `sat.conf` is now first checked in `/etc/_sat.conf` for system-related settings
author Goffi <goffi@goffi.org>
date Thu, 15 Oct 2020 16:13:30 +0200
parents 1352564e0202
children ecdb3728749e
comparison
equal deleted inserted replaced
3378:67e306cae157 3379:9081b6c41328
456 import os 456 import os
457 # we use parent of "sat" module dir as last config path, this is useful for 457 # we use parent of "sat" module dir as last config path, this is useful for
458 # per instance configurations (e.g. a dev instance and a main instance) 458 # per instance configurations (e.g. a dev instance and a main instance)
459 root_dir = dirname(dirname(sat.__file__)) + '/' 459 root_dir = dirname(dirname(sat.__file__)) + '/'
460 Const.CONFIG_PATHS = ( 460 Const.CONFIG_PATHS = (
461 ["/etc/", "~/", "~/."] 461 # /etc/_sat.conf is used for system-related settings (e.g. when media_dir
462 # is set by the distribution and has not reason to change, or in a Docker
463 # image)
464 ["/etc/_", "/etc/", "~/", "~/."]
462 + [ 465 + [
463 "%s/" % path 466 "%s/" % path
464 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE)) 467 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE))
465 ] 468 ]
466 + [root_dir] 469 + [root_dir]