diff --git a/backend/scripts/sync_all_zones.py b/backend/scripts/sync_all_zones.py index f408219..986b700 100644 --- a/backend/scripts/sync_all_zones.py +++ b/backend/scripts/sync_all_zones.py @@ -140,11 +140,12 @@ def download_czds_zone(tld: str, max_retries: int = 3) -> Optional[Path]: if gz_file.exists(): return gz_file - # Try alternative naming + # Try alternative naming (pyCZDS sometimes uses different names) for f in CZDS_DIR.glob(f"*{tld}*.gz"): return f - - return None + + # File not found after download - raise exception to trigger retry + raise FileNotFoundError(f"Downloaded file not found for .{tld} in {CZDS_DIR}") except Exception as e: logger.warning(f"CZDS download attempt {attempt + 1} failed for .{tld}: {e}")