Skip to content

Commit

Permalink
[core] fix elif after raise
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-hdev committed Aug 7, 2020
1 parent 906000e commit 212e12b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meshroom/core/desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 212e12b

Please sign in to comment.