Skip to content

Commit

Permalink
Infer .lzma files as lzma
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdaulet committed Jan 26, 2024
1 parent d0b6129 commit e1e03ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fsspec/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ def isal(infile, mode="rb", **kwargs):
try:
from lzma import LZMAFile

register_compression("lzma", LZMAFile, "xz")
register_compression("xz", LZMAFile, "xz", force=True)
register_compression("lzma", LZMAFile, "lzma")
register_compression("xz", LZMAFile, "xz")
except ImportError:
pass

try:
import lzmaffi

register_compression("lzma", lzmaffi.LZMAFile, "xz", force=True)
register_compression("lzma", lzmaffi.LZMAFile, "lzma", force=True)
register_compression("xz", lzmaffi.LZMAFile, "xz", force=True)
except ImportError:
pass
Expand Down

0 comments on commit e1e03ec

Please sign in to comment.