lilydjwg / nvchecker

New version checker for software releases
MIT License
431 stars 69 forks source link

regex: make sure regex fails if nothing is found #200

Closed yan12125 closed 3 years ago

yan12125 commented 3 years ago

This is a regression since 2019 [1]. Before that commit, max() raises ValuError if re.findall returns an empty list. After that commit, regex fails silently if nothing is found.

[1] https://github.com/lilydjwg/nvchecker/commit/789731729472824e79e519c033a432a35cf402b2#diff-fd40f1295f9ddece86df8d2c385ddb02bd4e2a10cd20bd9a95306d3d35a9b601

Noticed this as https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/android-ndk is not automatically updated and no errors are reported.