From 172a143ecbdf39b18c36148f086d6b641d59cf9b Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 16 Nov 2021 11:56:20 +0100 Subject: [PATCH] plugin_tools: adding exception because 'mxf` is not supported by oiio --- openpype/lib/plugin_tools.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openpype/lib/plugin_tools.py b/openpype/lib/plugin_tools.py index aa9e0c9b57..12c77abead 100644 --- a/openpype/lib/plugin_tools.py +++ b/openpype/lib/plugin_tools.py @@ -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