Implement writing openweathermap data to database.
[chrisu/seepark.git] / web / seepark_web.py
index c19e9b92e177cfac69d57eadd6f9ba9cca5d0a6a..e8b9da11dc6f0b4b20ca6c44841cc22825acb213 100644 (file)
@@ -132,7 +132,7 @@ def sensordata(sensor_id=None, sensor_type=None):
 def currentairtemperature(apikey, cityid):
     """Retruns the tuple temperature, datetime (as float, datetime) in case of success, otherwise None, None."""
     try:
-        weatherdata = openweathermap_json(apikey, cityid)
+        url, weatherdata = openweathermap_json(apikey, cityid)
         return weatherdata['main']['temp'], datetime.datetime.fromtimestamp(weatherdata['dt'])
     except OpenWeatherMapError:
         return None, None