Skip to content

Commit

Permalink
Remove useless warning
Browse files Browse the repository at this point in the history
See #93
  • Loading branch information
dolfinus authored Jan 30, 2024
1 parent 85b140a commit 72326ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setuptools_git_versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ def _callable_factory(
try:
return _load_callable(regexp_or_ref, package_name, root=root)
except (ImportError, NameError) as e:
log.warning("%s is not a valid function reference: %s", callable_name, e)
pass

try:
return callable_factory(regexp_or_ref)
except re.error as e:
log.error("%s is not valid regexp: %s", callable_name, e)
log.error("%s is not valid regexp neither a valid function reference: %s", callable_name, e)
raise ValueError(f"Cannot parse {callable_name}") from e


Expand Down

0 comments on commit 72326ea

Please sign in to comment.