Skip to contentSkip to conversation

layerindex/models.py: fix Inactive-Upstream check

PATCH New Tim Orling 1 participant 1 message Nov 17, 2023

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH 1/1 layerindex/models.py: fix Inactive-Upstream check

The regex for Upstream-Status had (\w+), but this does not include hyphen/dash. Explicitly add it to the pattern.

---
 layerindex/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
layerindex/models.py +1 -1
index 397425a..676f05f 100644
@@ -550,7 +550,7 @@ class Source(models.Model):
     def __str__(self):
         return '%s - %s - %s' % (self.recipe.layerbranch, self.recipe.pn, self.url)
 
-patch_status_re = re.compile(r"^[\t ]*(Upstream[-_ ]Status:?)[\t ]*(\w+)([\t ]+.*)?", re.IGNORECASE | re.MULTILINE)
+patch_status_re = re.compile(r"^[\t ]*(Upstream[-_ ]Status:?)[\t ]*([\w\-]+)([\t ]+.*)?", re.IGNORECASE | re.MULTILINE)
 
 class Patch(models.Model):
     PATCH_STATUS_CHOICES = [
Signature · 1 line
2.34.1