Using units from settings-file
This commit is contained in:
parent
3981bf8a80
commit
261eb5660f
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue