Skip to content

Commit

Permalink
[Dev] catch only subprocess.CalledProcessError, with @Tishj
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi committed Mar 17, 2024
1 parent 0b3985d commit 6d0039c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/package_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"


Expand Down
4 changes: 2 additions & 2 deletions tools/pythonpkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"


Expand Down

0 comments on commit 6d0039c

Please sign in to comment.