]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Do not use USER config anymore to define the base path
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 19 Sep 2016 10:31:33 +0000 (12:31 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 19 Sep 2016 10:31:33 +0000 (12:31 +0200)
src/__init__.py

index fdefb41a044c9144ef56a5dffcc496c4905fdd46..376ff1fd674513b7dde5681cc25ef128997a109c 100644 (file)
@@ -120,12 +120,14 @@ def get_base_path(config):
     :return: The path of the product base.
     :rtype: str
     '''
-    if "base" in config.SITE:
-        base_path = config.SITE.base
-    else:
-        # default base
-        base_path = config.USER.base
-    return base_path
+    if "base" not in config.SITE:
+        site_file_path = os.path.join(config.VARS.salometoolsway,
+                                      "data",
+                                      "site.pyconf")
+        msg = _("Please define a base path in the file %s" % site_file_path)
+        raise SatException(msg)
+
+    return config.SITE.base
 
 def get_salome_version(config):
     if hasattr(config.APPLICATION, 'version_salome'):