diff src/core/constants.py @ 1001:eb3601ff73bc

core: fixes constants.py
author souliane <souliane@mailoo.org>
date Sun, 27 Apr 2014 18:51:03 +0200
parents 652c01ca69b1
children 52ec79aa5bbe
line wrap: on
line diff
--- 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'))]
                        ]