From 741cae5b1bbcd76ce1d16dd97ed6726b3a03d304 Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Mon, 19 Sep 2016 12:31:33 +0200 Subject: [PATCH] Do not use USER config anymore to define the base path --- src/__init__.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/__init__.py b/src/__init__.py index fdefb41..376ff1f 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -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'): -- 2.39.2