We are talking about a couple of lines of duplication here. I agree that the export mechanism could be unified between hazard and risk (in bin/openquake too) but it is outside of the scope of this pull request.