Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/physrisk/hazard_models/core_hazards.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
SourcePaths,
)
from physrisk.data.inventory import EmbeddedInventory, Inventory
from physrisk.kernel import hazards
from physrisk.kernel.hazards import (
ChronicHeat,
CoastalInundation,
Expand Down Expand Up @@ -107,7 +106,15 @@ def all_hazards(self):
)

def hazard_types(self):
return [hazards.hazard_class(ht) for ht in self.all_hazards()]
hazard_types = []
for hazard in self.all_hazards():
try:
hazard_types.append(hazard_class(hazard))
except AttributeError:
logger.warning(
f"unable to find hazard class for hazard {hazard}, skipping"
)
return hazard_types

def resource_paths(
self,
Expand Down
21 changes: 0 additions & 21 deletions tests/test_base.py

This file was deleted.

Loading