From 212e12b7fb0a394f197966e86f3e9ad462f45827 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Fri, 7 Aug 2020 18:27:08 +0200 Subject: [PATCH] [core] fix elif after raise --- meshroom/core/desc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/core/desc.py b/meshroom/core/desc.py index 218daec5d0..1a571a72c1 100644 --- a/meshroom/core/desc.py +++ b/meshroom/core/desc.py @@ -72,7 +72,7 @@ def validateValue(self, value): if isinstance(value, PySide2.QtQml.QJSValue): # Note: we could use isArray(), property("length").toInt() to retrieve all values raise ValueError("ListAttribute.validateValue: cannot recognize QJSValue. Please, use JSON.stringify(value) in QML.") - elif isinstance(value, pyCompatibility.basestring): + if isinstance(value, pyCompatibility.basestring): # Alternative solution to set values from QML is to convert values to JSON string # In this case, it works with all data types value = ast.literal_eval(value) @@ -108,7 +108,7 @@ def validateValue(self, value): if isinstance(value, PySide2.QtQml.QJSValue): # Note: we could use isArray(), property("length").toInt() to retrieve all values raise ValueError("GroupAttribute.validateValue: cannot recognize QJSValue. Please, use JSON.stringify(value) in QML.") - elif isinstance(value, pyCompatibility.basestring): + if isinstance(value, pyCompatibility.basestring): # Alternative solution to set values from QML is to convert values to JSON string # In this case, it works with all data types value = ast.literal_eval(value)