From ac7127d05a5dc9a81870492d851b0c74c8eb8a43 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Fri, 31 Dec 2021 00:55:23 +0000 Subject: [PATCH] Volshell: Sync errors with the CLI concerning unsatisfied requirements Fixes #607 --- volatility3/cli/volshell/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/volatility3/cli/volshell/__init__.py b/volatility3/cli/volshell/__init__.py index 409123457..7b8a759a6 100644 --- a/volatility3/cli/volshell/__init__.py +++ b/volatility3/cli/volshell/__init__.py @@ -238,9 +238,14 @@ class VolShell(cli.CommandLine): vollog.debug("Writing out configuration data to config.json") with open("config.json", "w") as f: json.dump(dict(constructed.build_configuration()), f, sort_keys = True, indent = 2) + except exceptions.UnsatisfiedException as excp: + self.process_unsatisfied_exceptions(excp) + parser.exit(1, f"Unable to validate the plugin requirements: {[x for x in excp.unsatisfied]}\n") + try: # Construct and run the plugin - constructed.run() + if constructed: + constructed.run() except exceptions.VolatilityException as excp: self.process_exceptions(excp) parser.exit(1, f"Unable to validate the plugin requirements: {[x for x in excp.unsatisfied]}\n")