Don't use ExceptionGroup because upgrading python is too painful

pull/471/head
Mike Lang 3 weeks ago
parent 6b1989ec4c
commit fd0f0399fc

@ -125,7 +125,7 @@ def download_media(
# fall through to next retry loop # fall through to next retry loop
else: else:
# This block will be reached if range(retries) runs out but not via "break" # This block will be reached if range(retries) runs out but not via "break"
raise ExceptionGroup(f"All retries failed for url {urls[-1]}", errors) raise Exception(f"All retries failed for url {urls[-1]}: {errors}")
raise Exception("Too many redirects") raise Exception("Too many redirects")
@ -340,7 +340,7 @@ def download_imgur_url(output_dir, max_size, url):
_save_content(output_dir, [url], "json", json.dumps(contents_urls)) _save_content(output_dir, [url], "json", json.dumps(contents_urls))
if failed: if failed:
raise ExceptionGroup(failed) raise Exception(str(failed))
return True return True

Loading…
Cancel
Save