From c7f12fc90459fd16eaadf8c2a1b04e9c1e54b052 Mon Sep 17 00:00:00 2001 From: souliane Date: Sun, 27 Apr 2014 18:51:03 +0200 Subject: [PATCH] core: fixes constants.py --- src/core/constants.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/constants.py b/src/core/constants.py index 99a61903..ce9a8df2 100644 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -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'))] ]