python locks without proper error upon compilation errors

When trying to run some code with python UGGrid, python got stuck upon

grid = dune.grid.ugGrid(reader, dimgrid=2)

It states

DUNE-INFO: Compiling HierarchicalGrid

and never finishes.

I figured out that the actual problem is a compilation error in the bindings. In order to realize this, one has to go to the dune-py/python/dune/generated directory, figure out, which .cc file is not yet compiled run something like make hierarchicalgrid_aafc118db4a227d1c1e986789dc59e2d. This the reveals the actual error (which is not part of this issue).

The expected behaviour would be an exception with a proper error message, including the compiler output.