mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-02 18:45:52 +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)
|
||||
|
||||
# spin the transforms as required
|
||||
if len(update_transforms) > 0:
|
||||
for transform in update_transforms:
|
||||
updated_file = transform_methods[transform](updated_file)
|
||||
for transform in update_transforms:
|
||||
updated_file = transform_methods[transform](updated_file)
|
||||
|
||||
# get rid of carriage-return symbols
|
||||
updated_file = updated_file.replace("\r", "")
|
||||
|
|
Loading…
Reference in New Issue
Block a user