From cb02eeb1c9506634ae3f58459c1f357006a93f02 Mon Sep 17 00:00:00 2001 From: Sonkeng Maldini Date: Fri, 23 Oct 2020 03:27:57 +0100 Subject: [PATCH 1/2] update message on create_settings when settings are constrained --- conans/model/conan_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conans/model/conan_file.py b/conans/model/conan_file.py index 67a7613cd59..e2cfa0405a8 100644 --- a/conans/model/conan_file.py +++ b/conans/model/conan_file.py @@ -69,7 +69,7 @@ def create_settings(conanfile, settings): settings.constraint(current) return settings except Exception as e: - raise ConanInvalidConfiguration("Error while initializing settings. %s" % str(e)) + raise ConanInvalidConfiguration("The recipe is contraining settings. %s" % str(e)) @contextmanager From 6f58a6c7a02bf35da0de532672ff7db1eeb0d198 Mon Sep 17 00:00:00 2001 From: Sonkeng Maldini Date: Fri, 23 Oct 2020 09:35:42 +0100 Subject: [PATCH 2/2] fix: failing test in test_cppstd.py --- conans/test/conan_v2/settings_model/test_cppstd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conans/test/conan_v2/settings_model/test_cppstd.py b/conans/test/conan_v2/settings_model/test_cppstd.py index 90e4aad4073..770c5cd9c9d 100644 --- a/conans/test/conan_v2/settings_model/test_cppstd.py +++ b/conans/test/conan_v2/settings_model/test_cppstd.py @@ -30,7 +30,7 @@ class Recipe(ConanFile): if use_settings_v1: self.assertIn("Conan v2 incompatible: Setting 'cppstd' is deprecated", t.out) else: - self.assertIn("ERROR: Error while initializing settings. 'settings.cppstd' doesn't exist", t.out) + self.assertIn("ERROR: The recipe is contraining settings. 'settings.cppstd' doesn't exist", t.out) @parameterized.expand([(True,), (False,)]) def test_settings_model(self, use_settings_v1):