From ea76c1c346aca130a2c187143e26ff8eb156d89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Tue, 16 Nov 2021 14:45:00 +0100 Subject: [PATCH] Update openpype/lib/plugin_tools.py improving exception behavior Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- openpype/lib/plugin_tools.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openpype/lib/plugin_tools.py b/openpype/lib/plugin_tools.py index 12c77abead..891163e3ae 100644 --- a/openpype/lib/plugin_tools.py +++ b/openpype/lib/plugin_tools.py @@ -537,14 +537,14 @@ def should_decompress(file_url): "--info", "-v", file_url]) return "compression: \"dwaa\"" in output or \ "compression: \"dwab\"" in output - except RuntimeError as _E: + except RuntimeError: _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) + # TODO: should't the list of allowed extensions be + # taken from an OIIO variable of supported formats + if ext not in [".mxf"]: + # Reraise exception + raise + return False return False