Check for empty strings

main
Bob Mottram 2023-09-16 13:47:23 +01:00
parent fcafcc7404
commit ddcfd2a01d
1 changed files with 2 additions and 1 deletions

View File

@ -161,7 +161,8 @@ def save_unavailable_sites(base_dir: str, sites_unavailable: []) -> None:
with open(unavailable_sites_filename, 'w+',
encoding='utf-8') as fp_sites:
for site in sites_unavailable:
fp_sites.write(site + '\n')
if site:
fp_sites.write(site + '\n')
except OSError:
print('EX: unable to save unavailable sites')