err shouldnt happen if user has home configured

This commit is contained in:
Sean Breckenridge 2023-02-22 19:07:58 -08:00
parent eeea347025
commit c19cae2c88

View file

@ -26,6 +26,7 @@ def fallback_estimators() -> Iterator[LocationEstimator]:
def estimate_location(dt: DateExact) -> FallbackLocation:
loc = estimate_from(dt, estimators=list(fallback_estimators()))
# should never happen if the user has home configured
if loc is None:
raise ValueError("Could not estimate location")
return loc