Skip to content

Commit

Permalink
#2285 Check and give wwarning if met_point_data or point_data is miss…
Browse files Browse the repository at this point in the history
…ing from python script.
  • Loading branch information
Howard Soh committed Apr 17, 2023
1 parent c893ed0 commit 08aeeec
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/libcode/vx_pointdata_python/python_pointdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,19 @@ if ( ! module_obj ) {

bool result = false;
PyObject *met_point_data = get_python_object(module_obj, python_key_point_data);
if ( met_point_data ) {
if ( met_point_data && met_point_data != &_Py_NoneStruct) {
result = process_point_data(met_point_data, met_pd_out);
}
else {
PyObject *point_data = get_python_object(module_obj, python_key_point_data_list);
result = process_point_data_list(point_data, met_pd_out, filters);
if ( point_data && point_data != &_Py_NoneStruct)
result = process_point_data_list(point_data, met_pd_out, filters);
else {
mlog << Warning << "\n" << method_name
<< "no \"" << python_key_point_data << "\" and \""
<< python_key_point_data_list << "\" from "
<< script_name << "\"\n\n";
}
}

return result;
Expand Down

0 comments on commit 08aeeec

Please sign in to comment.