commit some long outstanding changes

This commit is contained in:
Joeri Exelmans 2025-07-23 13:57:25 +02:00
parent e046f2f972
commit 558772fbe4
2 changed files with 7 additions and 3 deletions

View file

@ -223,7 +223,12 @@ def rewrite(state,
result = exec_then_eval(python_expr,
_globals=eval_globals,
_locals={'this': host_obj}) # 'this' can be used to read the previous value of the slot
host_odapi.overwrite_primitive_value(host_obj_name, result, is_code=False)
# print("EVAL", common_name, python_expr, "RESULT", result, host_obj_name)
try:
host_odapi.overwrite_primitive_value(host_obj_name, result, is_code=False)
except Exception as e:
e.add_note(f"while evaluating attribute {common_name}")
raise
else:
msg = f"Don't know what to do with element '{common_name}' -> '{host_obj_name}:{host_type}')"
# print(msg)