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:
Arksine 2021-03-17 12:37:04 -04:00
parent 06c35fa0b2
commit 038fcec1f4
1 changed files with 0 additions and 2 deletions

View File

@ -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: