Skip to content
Snippets Groups Projects

Added stricter controls over the returned values by the datasource.

Merged Adham Hashibon requested to merge enforce-error-message-for-incorrect-return-values into master
1 file
+ 1
2
Compare changes
  • Side-by-side
  • Inline
@@ -145,7 +145,7 @@ def _compute_layer_results(environment_data_values,
if not isinstance(res, list):
error_txt = (
"The run method of data source {} must return a list."
"The run method of data source {} must return a list."
" It returned instead {}. Fix the run() method to return"
" the appropriate entity.".format(
factory.name,
@@ -197,7 +197,6 @@ def _compute_layer_results(environment_data_values,
log.error(error_txt)
raise RuntimeError(error_txt)
# At this point, the returned data values are unnamed.
# Add the names as specified by the user.
for dv, output_slot_info in zip(res, model.output_slot_info):
Loading