Fixed memory() and RET usage
This commit is contained in:
@@ -23,7 +23,7 @@ def is_same_success(context, return_values):
|
||||
Returns True if all returns values are successful and have the same value
|
||||
:param context:
|
||||
:param return_values:
|
||||
:return:
|
||||
:return: True False or None (None if the concept is not evaluated)
|
||||
"""
|
||||
assert isinstance(return_values, list)
|
||||
|
||||
@@ -31,17 +31,10 @@ def is_same_success(context, return_values):
|
||||
if not ret_val.status:
|
||||
raise Exception("Status is false")
|
||||
|
||||
if isinstance(ret_val.body, Concept):
|
||||
if not ret_val.body.metadata.is_evaluated:
|
||||
evaluated = context.sheerka.evaluate_concept(context, ret_val.body, eval_body=True)
|
||||
if not context.sheerka.is_success(evaluated):
|
||||
raise Exception("Failed to evaluate evaluate")
|
||||
if isinstance(ret_val.body, Concept) and not ret_val.body.metadata.is_evaluated:
|
||||
raise Exception("Concept is not evaluated")
|
||||
|
||||
return context.sheerka.objvalue(evaluated)
|
||||
else:
|
||||
return context.sheerka.objvalue(ret_val.body)
|
||||
else:
|
||||
return context.sheerka.objvalue(ret_val)
|
||||
return context.sheerka.objvalue(ret_val)
|
||||
|
||||
try:
|
||||
reference = _get_value(return_values[0])
|
||||
@@ -53,7 +46,7 @@ def is_same_success(context, return_values):
|
||||
|
||||
except Exception as ex:
|
||||
context.log_error(ex)
|
||||
return False
|
||||
return None
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user