Skip to content

Commit

Permalink
Remove unused ARJ Exception, reword error messages
Browse files Browse the repository at this point in the history
Reason should be a better phrase.
  • Loading branch information
kissgyorgy committed Dec 7, 2021
1 parent 5daf6aa commit 0e5280f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions unblob/handlers/archive/arj.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ class ARJError(Exception):


class ARJNullFile(ARJError):
"""Raised for zero-sized ARJ files."""
"""Zero-sized ARJ."""


class ARJExtendedHeader(ARJError):
"""Main ARJ header contains extended_header, which we don't handle."""


class ARJFileLengthError(ARJError):
"""This is a zero-sized ARJ."""


class ARJHandler(StructHandler):
NAME = "arj"

Expand Down Expand Up @@ -150,11 +146,11 @@ def calculate_chunk(
self._read_arj_main_header(file, start_offset)
end_of_arj = self._read_arj_files(file)
except ARJError as exc:
logger.warning("Invalid ARJ file", message=exc.__doc__)
logger.warning("Invalid ARJ file", reason=exc.__doc__)
return
except EOFError:
logger.warning(
"Invalid ARJ file", message="File ends before ARJ file resolves."
"Invalid ARJ file", reason="File ends before ARJ file resolves."
)
return

Expand Down

0 comments on commit 0e5280f

Please sign in to comment.