Skip to content

Commit

Permalink
Fix up to look nice
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshi committed Nov 23, 2021
1 parent 9f7dce4 commit 432b4d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions unblob/handlers/archive/zip.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import io
import zipfile
from typing import List, Union

from dissect.cstruct import cstruct
from structlog import get_logger
from typing import List, Set, Tuple, Union

from ...models import ValidChunk, UnknownChunk
from ...file_utils import find_first
from ...models import UnknownChunk, ValidChunk

logger = get_logger()

Expand Down Expand Up @@ -113,7 +113,7 @@ def _calculate_zipfile_end(file: io.BufferedReader, start_offset: int) -> int:
# In our case, we want to find the first instance of the EOCD record header, not the last!
zip_end = find_first(file, b"\x50\x4b\x05\x06") + start_offset
file.seek(zip_end)
eocd = cparser.end_of_central_directory(file)
_ = cparser.end_of_central_directory(file)
return file.tell()


Expand Down Expand Up @@ -148,7 +148,7 @@ def calculate_chunk(
return UnknownChunk(
start_offset=start_offset,
end_offset=end_of_zip,
reason=f"ZIP contains encrypted files.",
reason="ZIP contains encrypted files.",
)

return ValidChunk(
Expand Down

0 comments on commit 432b4d3

Please sign in to comment.