mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-07 13:02:27 +02:00
Remove Superfluous Check for Zero-Length List
Checking for zero-length is not necessary here as iterating over a zero-length list is perfectly valid, and produces exactly zero iterations, matching the intended behaviour without an extra check.
This commit is contained in:
parent
9515e0ccca
commit
4b5dc8d920
@ -620,9 +620,8 @@ def update_all_sources(source_data_filename, host_filename):
|
|||||||
updated_file = get_file_by_url(update_url)
|
updated_file = get_file_by_url(update_url)
|
||||||
|
|
||||||
# spin the transforms as required
|
# spin the transforms as required
|
||||||
if len(update_transforms) > 0:
|
for transform in update_transforms:
|
||||||
for transform in update_transforms:
|
updated_file = transform_methods[transform](updated_file)
|
||||||
updated_file = transform_methods[transform](updated_file)
|
|
||||||
|
|
||||||
# get rid of carriage-return symbols
|
# get rid of carriage-return symbols
|
||||||
updated_file = updated_file.replace("\r", "")
|
updated_file = updated_file.replace("\r", "")
|
||||||
|
Loading…
Reference in New Issue
Block a user