Skip to content

Commit

Permalink
makes xt handlers public
Browse files Browse the repository at this point in the history
  • Loading branch information
huettenhain committed Nov 24, 2023
1 parent 2c6a332 commit 1dfe431
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions refinery/units/formats/archive/xt.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class xt(ArchiveUnit):
@classmethod
def handles(cls, data: bytearray) -> Optional[bool]:
out = False
for engine in cls._handlers():
for engine in cls.handlers():
engine_verdict = engine.handles(data)
if engine_verdict is True:
return True
Expand All @@ -24,7 +24,10 @@ def handles(cls, data: bytearray) -> Optional[bool]:
return out

@staticmethod
def _handlers():
def handlers():
"""
Returns all archive handlers supported by the unit.
"""
from refinery.units.formats.office.xtone import xtone
yield xtone
from refinery.units.formats.archive.xtgz import xtgz
Expand Down Expand Up @@ -129,7 +132,7 @@ def __iter__(self):
elif verdict is None:
fallback.append(handler)

for handler in self._handlers():
for handler in self.handlers():
self._custom_path_separator = handler._custom_path_separator
it = unpacker(handler, fallback=False)
yield from it
Expand Down

0 comments on commit 1dfe431

Please sign in to comment.