Skip to content

Commit

Permalink
Move re.match outside try-except
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen committed Oct 16, 2024
1 parent 273163d commit ec7b312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cherry_picker/cherry_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,8 @@ def version_sort_key(config, branch):
to oldest version.
Branches without version information come second and are sorted alphabetically.
"""
match = re.match(r"^.*(?P<version>\d+(\.\d+)+).*$", branch)
try:
match = re.match(r"^.*(?P<version>\d+(\.\d+)+).*$", branch)
raw_version = match.groupdict()["version"].split(".")
except AttributeError as attr_err:
if not branch:
Expand Down

0 comments on commit ec7b312

Please sign in to comment.