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.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
This commit is contained in:
Tim Orling 2023-11-16 20:50:14 -08:00
parent dd38760c18
commit 0bcaf71deb

View File

@ -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 = [