From 771595ba853f1e25a8a640d1d961c0e7fd4e9309 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 18 Oct 2022 21:36:58 +0200 Subject: [PATCH] Catch invalid XML in links --- lib/importer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/importer.py b/lib/importer.py index b691297..562ec00 100644 --- a/lib/importer.py +++ b/lib/importer.py @@ -133,7 +133,11 @@ class Importer: rev = OBSRevision(self.obs, self, project, package).parse(r) if not latest or rev.rev > latest.rev: dbrev = DBRevision.import_obs_rev(db, rev) - root = rev.read_link() + try: + root = rev.read_link() + except ET.ParseError: + dbrev.set_broken(db) + continue if root is not None: tprj = root.get("project") or project tpkg = root.get("package") or package