fix python dumper to skip empty lines