1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-13 07:56:14 +01:00

Merge pull request #523 from lethliel/python3_fetch_module

[python3] fetch.py python3 ready
This commit is contained in:
Marco Strigl 2019-04-15 15:09:43 +02:00 committed by GitHub
commit 6220711a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,9 +78,9 @@ class Fetcher:
raise oscerr.APIError('CPIO archive is incomplete '
'(see .errors file)')
if package == '_repository':
n = re.sub(rb'\.pkg\.tar\..z$', b'.arch', hdr.filename)
n = re.sub(b'\.pkg\.tar\..z$', b'.arch', hdr.filename)
if n.startswith(b'container:'):
n = re.sub(rb'\.tar\..z$', b'.tar', hdr.filename)
n = re.sub(b'\.tar\..z$', b'.tar', hdr.filename)
pac = pkgs[decode_it(n.rsplit(b'.', 1)[0])]
pac.canonname = hdr.filename
else: