# HG changeset patch # User souliane # Date 1398617463 -7200 # Node ID eb3601ff73bc2c2fd7bf4cfff0f591c8e781179f # Parent 6f1e03068b5fdc3b3f2be971c4caf720fcde6f2d core: fixes constants.py diff -r 6f1e03068b5f -r eb3601ff73bc src/core/constants.py --- a/src/core/constants.py Sun Apr 27 18:22:12 2014 +0200 +++ b/src/core/constants.py Sun Apr 27 18:51:03 2014 +0200 @@ -19,10 +19,10 @@ import os.path try: - from xdg import BaseDirectory + import __pyjamas__ # do not import xdg when building Libervia + BaseDirectory = None except ImportError: - # Catch JS runtime error while using Libervia - BaseDirectory = None + from xdg import BaseDirectory class Const(object): @@ -66,8 +66,8 @@ 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'))] ]