From 8a833547d1914038d78d4f0956484d5b4257c587 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 17 Jan 2024 14:43:34 +0000 Subject: [PATCH 1/2] DOC: Improve error message when env not found --- asv/environment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/asv/environment.py b/asv/environment.py index a17542f12..4c4836ece 100644 --- a/asv/environment.py +++ b/asv/environment.py @@ -440,8 +440,11 @@ def get_environment_class_by_name(environment_type): for cls in util.iter_subclasses(Environment): if cls.tool_name == environment_type: return cls + tool_names = [cls.tool_name for cls in util.iter_subclasses(Environment)] raise EnvironmentUnavailable( - f"Unknown environment type '{environment_type}'") + f"Unknown environment type '{environment_type}'. " + f"Allowed values are {tool_names}." + ) def is_existing_only(environments): From ab7bf9e3bb26cf0049cbd29511aba13f3e2d6420 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sat, 27 Jan 2024 20:00:31 +0000 Subject: [PATCH 2/2] DOC: Improve missing env error message Co-authored-by: Rohit Goswami --- asv/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asv/environment.py b/asv/environment.py index 4c4836ece..19e056b55 100644 --- a/asv/environment.py +++ b/asv/environment.py @@ -443,7 +443,7 @@ def get_environment_class_by_name(environment_type): tool_names = [cls.tool_name for cls in util.iter_subclasses(Environment)] raise EnvironmentUnavailable( f"Unknown environment type '{environment_type}'. " - f"Allowed values are {tool_names}." + f"Allowed values based on existing plugins are {tool_names}." )