Line 487-498 could be simplified if in ```openquake.calculators.hazard.classical.core``` at line 378 you use ```[x.weight for x in site_chunk if x.weight is not None]``` or by using the function ```all``` at line 489.