From 47341107eadc35adf95a34acc866051889a99b5e Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Mon, 3 May 2021 14:53:56 +0200
Subject: [PATCH] build/python/build/project.py: raise exception on regex
 mismatch

---
 python/build/project.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/build/project.py b/python/build/project.py
index 183d87675..2b8c14723 100644
--- a/python/build/project.py
+++ b/python/build/project.py
@@ -14,13 +14,14 @@ class Project:
         if base is None:
             basename = os.path.basename(url)
             m = re.match(r'^(.+)\.(tar(\.(gz|bz2|xz|lzma))?|zip)$', basename)
-            if not m: raise
+            if not m: raise RuntimeError('Could not identify tarball name: ' + basename)
             self.base = m.group(1)
         else:
             self.base = base
 
         if name is None or version is None:
             m = re.match(r'^([-\w]+)-(\d[\d.]*[a-z]?[\d.]*(?:-(?:alpha|beta)\d+)?)(\+.*)?$', self.base)
+            if not m: raise RuntimeError('Could not identify tarball name: ' + self.base)
             if name is None: name = m.group(1)
             if version is None: version = m.group(2)