comparison sat/core/constants.py @ 3146:320b762cbdf0

core (constants): missing trailing `/`
author Goffi <goffi@goffi.org>
date Wed, 29 Jan 2020 19:21:16 +0100
parents 3f414c897e70
children c3e8ddf3a071
comparison
equal deleted inserted replaced
3145:3f414c897e70 3146:320b762cbdf0
20 try: 20 try:
21 from xdg import BaseDirectory 21 from xdg import BaseDirectory
22 from os.path import expanduser, realpath 22 from os.path import expanduser, realpath
23 except ImportError: 23 except ImportError:
24 BaseDirectory = None 24 BaseDirectory = None
25 from os.path import dirname
25 import sat 26 import sat
26 from pathlib import Path
27 27
28 28
29 class Const(object): 29 class Const(object):
30 30
31 ## Application ## 31 ## Application ##
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 = Path(sat.__file__).parent 456 root_dir = dirname(sat.__file__) + '/'
457 Const.CONFIG_PATHS = ( 457 Const.CONFIG_PATHS = (
458 ["/etc/", "~/", "~/."] 458 ["/etc/", "~/", "~/."]
459 + [ 459 + [
460 "%s/" % path 460 "%s/" % path
461 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE)) 461 for path in list(BaseDirectory.load_config_paths(Const.APP_NAME_FILE))