Skip to contentSkip to conversation

scripts: sphinx-pre-install: remove unnecessary double check for $cur_version

PATCH Applied Sebastian Muxel 2 participants 2 messages Aug 27, 2024 – Sep 5, 2024 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: sphinx-pre-install: remove unnecessary double check for $cur_version

$cur_version is currently being tested twice with the first test resulting in an unhelpful "$sphinx returned an error", not continuing to the more helpful "$sphinx didn't return its version".

This patch removes the first test to return the more useful message.

Fixes a8b380c379ef ("scripts: sphinx-pre-install: only ask to activate valid venvs")
---
 scripts/sphinx-pre-install | 2 --
 1 file changed, 2 deletions(-)
scripts/sphinx-pre-install +0 -2
index c1121f098542..ad9945ccb0cf 100755
@@ -300,8 +300,6 @@ sub check_sphinx()
 	}
 
 	$cur_version = get_sphinx_version($sphinx);
-	die ("$sphinx returned an error") if (!$cur_version);
-
 	die "$sphinx didn't return its version" if (!$cur_version);
 
 	if ($cur_version lt $min_version) {
Signature · 1 line
2.46.0
maintainer Applied
#1 lore raw
Quoted 17 lines · Sebastian Muxel

$cur_version is currently being tested twice with the first test resulting in an unhelpful "$sphinx returned an error", not continuing to the more helpful "$sphinx didn't return its version".

This patch removes the first test to return the more useful message.

Fixes a8b380c379ef ("scripts: sphinx-pre-install: only ask to activate valid venvs")
---
 scripts/sphinx-pre-install | 2 --
 1 file changed, 2 deletions(-)
scripts/sphinx-pre-install +0 -0
index c1121f098542..ad9945ccb0cf 100755

scripts/sphinx-pre-install sub check_sphinx() · line 303

Quoted 6 lines
scripts/sphinx-pre-install +0 -2
@@ -300,8 +300,6 @@ sub check_sphinx()
 	}
 
 	$cur_version = get_sphinx_version($sphinx);
-	die ("$sphinx returned an error") if (!$cur_version);
-
 	die "$sphinx didn't return its version" if (!$cur_version);

Applied, thanks.

jon