get_format_from_report(): use strings instead of literals

Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
This commit is contained in:
Yacine Elhamer
2023-06-26 09:05:20 +01:00
committed by GitHub
parent 5f6aade92b
commit 040ed4fa57

View File

@@ -57,7 +57,7 @@ def assert_never(value) -> NoReturn:
def get_format_from_report(sample: str) -> str:
with open(sample, "rb") as f:
report = json.load(f)
if FORMAT_CAPE.upper() in report.keys():
if "CAPE" in report.keys():
return FORMAT_CAPE
return FORMAT_UNKNOWN