implemented #115: make parameter for site name not case sensitive

pull/116/head
Master 6 years ago
parent bd65d00044
commit 34a0db9cd8

@ -369,12 +369,14 @@ def main():
# Make sure that the sites are supported & build up pruned site database. # Make sure that the sites are supported & build up pruned site database.
site_data = {} site_data = {}
site_missing = [] site_missing = []
site = str()
for site in args.site_list: for site in args.site_list:
if site in site_data_all: for existing_site in site_data_all:
site_data[site] = site_data_all[site] if site.lower() == existing_site.lower():
else: site_data[existing_site] = site_data_all[existing_site]
# Build up list of sites not supported for future error message. if not site_data:
site_missing.append(f"'{site}'") # Build up list of sites not supported for future error message.
site_missing.append(f"'{site}'")
if site_missing != []: if site_missing != []:
print(f"Error: Desired sites not found: {', '.join(site_missing)}.") print(f"Error: Desired sites not found: {', '.join(site_missing)}.")

Loading…
Cancel
Save