Skip to content

Commit 5fa16cb

Browse files
boegellexming
andauthored
use non-greedy .*? since re.sub doesn't accept flags in Python 2.6
Co-Authored-By: Alex Domingo <[email protected]>
1 parent e2d97f6 commit 5fa16cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easybuild/tools/filetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def pypi_source_urls(pkg_name):
499499

500500
# ignore yanked releases (see https://pypi.org/help/#yanked)
501501
# see https://github.com/easybuilders/easybuild-framework/issues/3301
502-
urls_txt = re.sub('^.*data-yanked.*$', '', urls_txt, flags=re.M)
502+
urls_txt = re.sub(r'<a.*?data-yanked.*?</a>', '', urls_txt)
503503

504504
parsed_html = ElementTree.ElementTree(ElementTree.fromstring(urls_txt))
505505
if hasattr(parsed_html, 'iter'):

0 commit comments

Comments
 (0)