core: fixes constants.py

This commit is contained in:
souliane 2014-04-27 18:51:03 +02:00
commit c7f12fc904

View file

@ -19,10 +19,10 @@
import os.path
try:
from xdg import BaseDirectory
except ImportError:
# Catch JS runtime error while using Libervia
import __pyjamas__ # do not import xdg when building Libervia
BaseDirectory = None
except ImportError:
from xdg import BaseDirectory
class Const(object):
@ -66,8 +66,8 @@ class Const(object):
DEFAULT_LOCAL_DIR = BaseDirectory.save_data_path('sat')
# List of the configuration filenames sorted by ascending priority
CONFIG_FILES = [(os.path.expanduser(path) + 'sat.conf') for path in \
['/etc/', '~/', '~/.', '', '.'] + \
CONFIG_FILES = [(os.path.expanduser(path) + 'sat.conf') for path in
['/etc/', '~/', '~/.', '', '.'] +
['%s/' % path for path in list(BaseDirectory.load_config_paths('sat'))]
]