Skip to content
Open
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
4 changes: 2 additions & 2 deletions sflock/unpack/zip7.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
class Zip7File(Unpacker):
name = "7zfile"
exe = "/usr/bin/7z"
exts = b".7z", b".iso"
exts = b".7z", b".iso", b".xz"
# TODO Should we use "isoparser" (check PyPI) instead of 7z?
magic = "7-zip archive", "ISO 9660"
magic = "7-zip archive", "ISO 9660", "UDF filesystem data", "XZ compressed data"

def unpack(self, password=None, duplicates=None):
dirpath = tempfile.mkdtemp()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def test_magic():

def test_magic_exception():
assert magic.from_file(
"tests/files/invld.elf_"
).startswith("ELF")
b"tests/files/invld.elf_"
).startswith(b"ELF")
assert magic.from_buffer(
open("tests/files/invld.elf_", "rb").read()
open(b"tests/files/invld.elf_", "rb").read()
).startswith("ELF")
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_supported():
assert supported()

def test_count_supported():
count = 9
count = 10

if AceFile(None).supported():
count += 1
Expand Down