From: Serge Rehbinder Date: Mon, 19 Sep 2016 10:31:33 +0000 (+0200) Subject: Do not use USER config anymore to define the base path X-Git-Tag: 5.0.0a1~117 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=741cae5b1bbcd76ce1d16dd97ed6726b3a03d304;p=tools%2Fsat.git Do not use USER config anymore to define the base path --- 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'):