mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-22 13:00:40 +08:00
repo.py: fix TypeError
This commit is contained in:
parent
3864a17b60
commit
ca00ac4ecd
2 changed files with 2 additions and 1 deletions
2
repo.py
2
repo.py
|
@ -155,7 +155,7 @@ def _update():
|
|||
if pkg_to_add.name.endswith(PKG_SUFFIX):
|
||||
sigfile = Path(f"{str(pkg_to_add)}.sig")
|
||||
if sigfile.exists():
|
||||
arch = get_pkg_details_from_name(pkg_to_add).arch
|
||||
arch = get_pkg_details_from_name(pkg_to_add.name).arch
|
||||
pkg_nlocation = pkg_to_add.parent / '..' / 'www' / arch / pkg_to_add.name
|
||||
sig_nlocation = Path(f'{str(pkg_nlocation)}.sig')
|
||||
logger.info(f'Moving {pkg_to_add} to {pkg_nlocation}, {sigfile} to {sig_nlocation}')
|
||||
|
|
1
utils.py
1
utils.py
|
@ -102,6 +102,7 @@ class Pkg:
|
|||
self.arch = arch
|
||||
|
||||
def get_pkg_details_from_name(name):
|
||||
assert type(name) is str
|
||||
if name.endswith(f'pkg.tar.{PKG_COMPRESSION}'):
|
||||
m = re.match(r'(.+)-([^-]+)-([^-]+)-([^-]+)\.pkg\.tar\.\w+', name)
|
||||
assert m and m.groups() and len(m.groups()) == 4
|
||||
|
|
Loading…
Reference in a new issue