Using units from settings-file

This commit is contained in:
Maximilian Giller 2019-02-27 20:11:43 +01:00
parent 3981bf8a80
commit 261eb5660f

View file

@ -2,10 +2,11 @@ from WeatherForecast import WeatherForecast
from WeatherInterface import WeatherInterface from WeatherInterface import WeatherInterface
import pyowm import pyowm
from datetime import datetime from datetime import datetime
from settings import units
class OwmForecasts (WeatherInterface): class OwmForecasts (WeatherInterface):
"""Fetches weather through the Openweathermap-api.""" """Fetches weather through the Openweathermap-api."""
def __init__ (self, api_key, units): def __init__ (self, api_key):
self.api = pyowm.OWM(api_key) self.api = pyowm.OWM(api_key)
self.units = units self.units = units