Skip to content

Commit

Permalink
Fix partitioner config exception message
Browse files Browse the repository at this point in the history
Improve logic to eliminate config exception message.
  • Loading branch information
matthewrmshin authored and wdeconinck committed Jan 15, 2024
1 parent e734e7a commit 8435757
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ CubedSphereDualMeshGenerator::CubedSphereDualMeshGenerator(const eckit::Parametr

// Get partitioner.
std::string partitioner;
try { p.get("partitioner.type", partitioner); } catch( std::exception& ) {}
p.get("partitioner", partitioner);
if( partitioner.size() ) {
if (p.get("partitioner", partitioner) && partitioner.size()) {
options.set("partitioner", partitioner);
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/atlas/meshgenerator/detail/CubedSphereMeshGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ CubedSphereMeshGenerator::CubedSphereMeshGenerator(const eckit::Parametrisation&

// Get partitioner.
std::string partitioner;
try { p.get("partitioner.type", partitioner); } catch( std::exception& ) {}
p.get("partitioner", partitioner);
if( partitioner.size() ) {
if (p.get("partitioner", partitioner) && partitioner.size()) {
options.set("partitioner", partitioner);
}
}
Expand Down

0 comments on commit 8435757

Please sign in to comment.