file_manager: update call to "run_with_response" method in metadata.
Since "run_with_response" now raises an exception there is no need to inspect the response for a None type. Instead the exception can be handled by the caller directly. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
06c35fa0b2
commit
038fcec1f4
|
@ -747,8 +747,6 @@ class MetadataStorage:
|
||||||
shell_command = self.server.lookup_plugin('shell_command')
|
shell_command = self.server.lookup_plugin('shell_command')
|
||||||
scmd = shell_command.build_shell_command(cmd, log_stderr=True)
|
scmd = shell_command.build_shell_command(cmd, log_stderr=True)
|
||||||
result = await scmd.run_with_response(timeout=10.)
|
result = await scmd.run_with_response(timeout=10.)
|
||||||
if result is None:
|
|
||||||
raise self.server.error(f"Metadata extraction error")
|
|
||||||
try:
|
try:
|
||||||
decoded_resp = json.loads(result.strip())
|
decoded_resp = json.loads(result.strip())
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue