diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-13 13:46:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-13 13:46:24 +0400 |
commit | 15634fd22e28e95f9d2905a29d4cc34fdb613e7c (patch) | |
tree | bfbda8e62b863b0978b2e8741f99f86c07fa083f /release/scripts | |
parent | 223cb8c94a332141ab3a97bf02c25470fa932070 (diff) |
fix for sequence size mismatch when loading themes, addition of alpha channel caused themes not to load.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/rna_xml.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py index e21ccd08a35..08b60ebc6f8 100644 --- a/release/scripts/modules/rna_xml.py +++ b/release/scripts/modules/rna_xml.py @@ -265,7 +265,15 @@ def xml2rna(root_xml, tp_name = 'ARRAY' # print(" %s.%s (%s) --- %s" % (type(value).__name__, attr, tp_name, subvalue_type)) - setattr(value, attr, value_xml_coerce) + try: + setattr(value, attr, value_xml_coerce) + except ValueError: + # size mismatch + val = getattr(value, attr) + if len(val) < len(value_xml_coerce): + setattr(value, attr, value_xml_coerce[:len(val)]) + else: + setattr(value, attr, list(value_xml_coerce) + list(val)[len(value_xml_coerce):]) # --------------------------------------------------------------------- # Complex attributes |