mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
code style : update remaining files (#1353)
* code style: update string formatting using fstrings --------- Co-authored-by: Willi Ballenthin <willi.ballenthin@gmail.com> Co-authored-by: Moritz <mr-tz@users.noreply.github.com>
This commit is contained in:
@@ -112,7 +112,7 @@ def get_capa_results(args):
|
||||
return {
|
||||
"path": path,
|
||||
"status": "error",
|
||||
"error": "input file does not appear to be a PE file: %s" % path,
|
||||
"error": f"input file does not appear to be a PE file: {path}",
|
||||
}
|
||||
except capa.main.UnsupportedRuntimeError:
|
||||
return {
|
||||
@@ -124,7 +124,7 @@ def get_capa_results(args):
|
||||
return {
|
||||
"path": path,
|
||||
"status": "error",
|
||||
"error": "unexpected error: %s" % (e),
|
||||
"error": f"unexpected error: {e}",
|
||||
}
|
||||
|
||||
meta = capa.main.collect_metadata([], path, [], extractor)
|
||||
@@ -202,7 +202,7 @@ def main(argv=None):
|
||||
elif result["status"] == "ok":
|
||||
results[result["path"]] = rd.ResultDocument.parse_obj(result["ok"]).json(exclude_none=True)
|
||||
else:
|
||||
raise ValueError("unexpected status: %s" % (result["status"]))
|
||||
raise ValueError(f"unexpected status: {result['status']}")
|
||||
|
||||
print(json.dumps(results))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user