Skip to content

Commit

Permalink
Merge pull request #522 from furlongm/arch-linux-tarfile
Browse files Browse the repository at this point in the history
use transparent decompression for opening arch linux db files
  • Loading branch information
furlongm authored Nov 9, 2023
2 parents ccc6628 + 560bbaa commit 7753c22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repos/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ def extract_arch_packages(data):
""" Extract package metadata from an arch linux tarfile
"""
from packages.utils import find_evr
extracted = BytesIO(extract(data, 'gz'))
tf = tarfile.open(fileobj=extracted, mode='r:*')
bio = BytesIO(data)
tf = tarfile.open(fileobj=bio, mode='r:*')
packages = set()
plen = len(tf.getnames())
if plen > 0:
Expand Down

0 comments on commit 7753c22

Please sign in to comment.