Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions minecode/mappers/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from packagedcode import models as scan_models
from packageurl import PackageURL

import debutils
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debutils is imported but not used?

from minecode import ls
from minecode import map_router
from minecode.mappers import Mapper
Expand Down
4 changes: 2 additions & 2 deletions minecode/visitors/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class DebianDirectoryIndexVisitor(NonPersistentHttpVisitor):
Collect package URIs from Debian-like repos with an ls-LR directory listing.
"""
def get_uris(self, content):
with gzip.open(content, 'rb') as f:
with gzip.open(content, 'rt') as f:
content = f.read()

url_template = self.uri.replace('ls-lR.gz', '{path}')
Expand Down Expand Up @@ -114,7 +114,7 @@ def get_uris(self, content):
type='deb',
namespace=namespace,
name=name,
version=version,
version=str(version),
qualifiers=dict(arch=arch) if arch else None)

yield URI(
Expand Down