diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-06 04:42:46 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-06 04:48:56 +0300 |
commit | 2e9e2715efac89084afd276f1447499c304a6c5c (patch) | |
tree | 7399ada16336555a9d03fabc19fd9e125e4441aa /release/scripts/modules/rna_xml.py | |
parent | 7bb8eeb3a871eb1e72ee129f8ff441f2752b37be (diff) |
Cleanup: use context.path_resolve instead of eval(..)
Diffstat (limited to 'release/scripts/modules/rna_xml.py')
-rw-r--r-- | release/scripts/modules/rna_xml.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/release/scripts/modules/rna_xml.py b/release/scripts/modules/rna_xml.py index 5a76c7878b8..d576aeec860 100644 --- a/release/scripts/modules/rna_xml.py +++ b/release/scripts/modules/rna_xml.py @@ -345,14 +345,10 @@ def xml2rna( def _get_context_val(context, path): - path_full = "context." + path try: - value = eval(path_full) - except: - import traceback - traceback.print_exc() - print("Error: %r could not be found" % path_full) - + value = context.path_resolve(path) + except Exception as ex: + print("Error: %r, path %r not found" % (ex, path)) value = Ellipsis return value |