From 00000d979a70123c58e122dd1f21e06730232938 Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Wed, 24 Sep 2025 01:00:30 -0400 Subject: [PATCH] e --- EPG/fetch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/EPG/fetch.py b/EPG/fetch.py index fa79d9d..0335d9b 100644 --- a/EPG/fetch.py +++ b/EPG/fetch.py @@ -55,12 +55,13 @@ replace_ids = { } -async def fetch_xml(url: str) -> ET.Element: +async def fetch_xml(url: str) -> ET.Element | None: try: r = await client.get(url) r.raise_for_status() except Exception as e: - raise SystemExit(f'Failed to fetch "{url}"\n{e}') from e + print(f'Failed to fetch "{url}"\n{e}') + return try: decompressed_data = gzip.decompress(r.content) @@ -68,7 +69,7 @@ async def fetch_xml(url: str) -> ET.Element: return ET.fromstring(decompressed_data) except Exception as e: - raise SystemExit(f'Failed to decompress and parse XML from "{url}"\n{e}') from e + print(f'Failed to decompress and parse XML from "{url}"\n{e}') def hijack_id(