do not catch error in HEAD as we need it fails on empty response

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2022-06-01 01:17:40 +03:00 committed by Anastasia Prasolova
parent e489b43d63
commit d696a8ee68
2 changed files with 20 additions and 17 deletions

View file

@ -247,13 +247,7 @@ def head_object(wallet: str, cid: str, oid: str, bearer_token: str="",
f'{"--raw" if is_raw else ""} '
f'{"--ttl 1" if is_direct else ""}'
)
output = None
try:
output = _cmd_run(cmd)
except Exception as exc:
logger.info(f"Head request failed with output: {output}")
return None
output = _cmd_run(cmd)
if not json_output:
return output