[utils] `read_batch_urls`: Fix deprecated `re.split` positional arg (3.13)

Authored by: bashonly
This commit is contained in:
bashonly 2024-04-30 17:52:25 -05:00
parent ed44e23245
commit adb148358e
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0
1 changed files with 1 additions and 1 deletions

View File

@ -2522,7 +2522,7 @@ def read_batch_urls(batch_fd):
return False
# "#" cannot be stripped out since it is part of the URI
# However, it can be safely stripped out if following a whitespace
return re.split(r'\s#', url, 1)[0].rstrip()
return re.split(r'\s#', url, maxsplit=1)[0].rstrip()
with contextlib.closing(batch_fd) as fd:
return [url for url in map(fixup, fd) if url]