Skip to content

Commit

Permalink
Fix code_style and pyinstaller ubuntu errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronatp authored Nov 13, 2023
1 parent f1faf08 commit ff4de2d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion capa/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,19 @@ def new_print(*args, **kwargs):
inspect.builtins.print = old_print # type: ignore


def log_unsupported_format_error():
logger.error("-" * 80)
logger.error(" Input file does not appear to be a PE or ELF file.")
logger.error(" ")
logger.error(
" capa currently only supports analyzing PE and ELF files (or shellcode, when using --format sc32|sc64)."
)
logger.error(" If you don't know the input file type, you can try using the `file` utility to guess it.")
logger.error("-" * 80)


def catch_log_return_errors(func):
error_list, return_values, message_list = \

[(UnsupportedFormatError, E_INVALID_FILE_TYPE,
(" Input file does not appear to be a PE or ELF file.",
" capa currently only supports analyzing PE and ELF files (or shellcode, when using --format sc32|sc64).",
Expand Down

0 comments on commit ff4de2d

Please sign in to comment.