From 6d0039c1d04a02de233d1d83a1034d1b1849a8ec Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Sun, 17 Mar 2024 11:39:29 +0100 Subject: [PATCH] [Dev] catch only subprocess.CalledProcessError, with @Tishj --- scripts/package_build.py | 4 ++-- tools/pythonpkg/setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/package_build.py b/scripts/package_build.py index f710633728fb..f202a13f06a8 100644 --- a/scripts/package_build.py +++ b/scripts/package_build.py @@ -137,7 +137,7 @@ def get_git_describe(): if len(override_git_describe) == 0: try: return subprocess.check_output(['git', 'describe', '--tags', '--long']).strip().decode('utf8') - except: + except subprocess.CalledProcessError: return "v0.0.0-0-deadbeeff" if len(override_git_describe.split('-')) == 2: return override_git_describe @@ -150,7 +150,7 @@ def get_git_describe(): + "-" + subprocess.check_output(['git', 'log', '-1', '--format=%h']).strip().decode('utf8') ) - except: + except subprocess.CalledProcessError: return override_git_describe + "-" + "deadbeeff" diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py index 506fcf455c70..4eede640b8aa 100644 --- a/tools/pythonpkg/setup.py +++ b/tools/pythonpkg/setup.py @@ -375,7 +375,7 @@ def get_git_describe(): if len(override_git_describe) == 0: try: return subprocess.check_output(['git', 'describe', '--tags', '--long']).strip().decode('utf8') - except: + except subprocess.CalledProcessError: return "v0.0.0-0-deadbeeff" if len(override_git_describe.split('-')) == 2: return override_git_describe @@ -388,7 +388,7 @@ def get_git_describe(): + "-" + subprocess.check_output(['git', 'log', '-1', '--format=%h']).strip().decode('utf8') ) - except: + except subprocess.CalledProcessError: return override_git_describe + "-" + "deadbeeff"