Skip to content

Commit

Permalink
#2772 Removed python_key_point_data & python_key_point_data_list and …
Browse files Browse the repository at this point in the history
…replaced them to tmp_point_var_name and tmp_point_data
  • Loading branch information
Howard Soh committed Jan 29, 2024
1 parent 118a2be commit 1cba5ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/libcode/vx_pointdata_python/python_pointdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -543,18 +543,18 @@ if ( ! module_obj ) {
}

bool result = false;
PyObject *met_point_data = get_python_object(module_obj, python_key_point_data);
PyObject *met_point_data = get_python_object(module_obj, tmp_point_var_name);
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);
PyObject *point_data = get_python_object(module_obj, tmp_point_data);
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 "
<< "no \"" << tmp_point_var_name << "\" and \""
<< tmp_point_data << "\" from "
<< script_name << "\"\n\n";
}
}
Expand Down Expand Up @@ -626,7 +626,7 @@ if ( ! tmp_dir ) tmp_dir = default_tmp_dir;

path << cs_erase
<< tmp_dir << '/'
<< tmp_nc_base_name;
<< tmp_py_base_name;

tmp_nc_path = make_temp_file_name(path.text(), 0);

Expand Down Expand Up @@ -722,12 +722,12 @@ if ( ! module_obj ) {
//


PyObject *met_point_data = get_python_object(module_obj, python_key_point_data);
PyObject *met_point_data = get_python_object(module_obj, tmp_point_var_name);
if ( met_point_data ) {
process_point_data(met_point_data, met_pd_out);
}
else {
PyObject *point_data = get_python_object(module_obj, python_key_point_data_list);
PyObject *point_data = get_python_object(module_obj, tmp_point_data);
process_point_data_list(point_data, met_pd_out, filters);
}

Expand Down
3 changes: 0 additions & 3 deletions src/libcode/vx_pointdata_python/python_pointdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ extern "C" {

////////////////////////////////////////////////////////////////////////

static const char python_key_point_data [] = "met_point_data";
static const char python_key_point_data_list[] = "point_data";

static const char python_key_nhdr [] = "nhdr";
//static const char python_key_npbhdr [] = "npbhdr";
static const char python_use_var_id [] = "use_var_id";
Expand Down

0 comments on commit 1cba5ec

Please sign in to comment.