forked from Mirror/pmbootstrap
pmb.helpers.aportupgrade: Check for none pkgver_match in upgrade_git_package (MR 2258)
Appeases Mypy.
This commit is contained in:
parent
bcfab8cfc3
commit
cb3807a9f6
1 changed files with 4 additions and 0 deletions
|
@ -141,6 +141,10 @@ def upgrade_git_package(args, pkgname: str, package) -> bool:
|
|||
pkgver = package["pkgver"]
|
||||
|
||||
pkgver_match = re.match(r"([\d.]+)_git", pkgver)
|
||||
if pkgver_match is None:
|
||||
msg = "pkgver did not match the expected pattern!"
|
||||
raise RuntimeError(msg)
|
||||
|
||||
date_pkgver = verinfo["date"].strftime("%Y%m%d")
|
||||
pkgver_new = f"{pkgver_match.group(1)}_git{date_pkgver}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue