plugin_tools: adding exception because 'mxf` is not supported by oiio

This commit is contained in:
Jakub Jezek 2021-11-16 11:56:20 +01:00
parent a9cb050ee7
commit 172a143ecb
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -531,12 +531,20 @@ def should_decompress(file_url):
and we can decompress (oiiotool supported)
"""
if oiio_supported():
output = run_subprocess([
get_oiio_tools_path(),
"--info", "-v", file_url])
return "compression: \"dwaa\"" in output or \
"compression: \"dwab\"" in output
try:
output = run_subprocess([
get_oiio_tools_path(),
"--info", "-v", file_url])
return "compression: \"dwaa\"" in output or \
"compression: \"dwab\"" in output
except RuntimeError as _E:
_name, ext = os.path.splitext(file_url)
if ext in [".mxf"]:
# TODO: should't the list of allowed extensions be
# taken from an OIIO variable of supported formats
return False
else:
raise RuntimeError(_E)
return False