diff --git a/meteostat/__init__.py b/meteostat/__init__.py index 016bf0a..33fc28c 100644 --- a/meteostat/__init__.py +++ b/meteostat/__init__.py @@ -12,7 +12,7 @@ """ __appname__ = 'meteostat' -__version__ = '1.5.4' +__version__ = '1.5.5' from .interface.base import Base from .interface.timeseries import Timeseries diff --git a/meteostat/interface/point.py b/meteostat/interface/point.py index f60b3e1..119c5b5 100644 --- a/meteostat/interface/point.py +++ b/meteostat/interface/point.py @@ -88,9 +88,10 @@ def get_stations(self, freq: str = None, start: datetime = None, unfiltered['elevation']) <= self.alt_range] # Apply inventory filter - age = (datetime.now() - end).days - if freq and start and end and (model == False or age > 180): - stations = stations.inventory(freq, (start, end)) + if freq and start and end: + age = (datetime.now() - end).days + if model == False or age > 180: + stations = stations.inventory(freq, (start, end)) # Apply altitude filter stations = stations.fetch() diff --git a/setup.py b/setup.py index 869af32..b7b1619 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ # Setup setup( name='meteostat', - version='1.5.4', + version='1.5.5', author='Meteostat', author_email='info@meteostat.net', description='Access and analyze historical weather and climate data with Python.',