Fix pep8 errors

This commit is contained in:
2019-10-19 16:36:50 +02:00
parent 7da8720566
commit 2d75e110b6

View File

@ -11,6 +11,7 @@ import pyowm
import requests
import sys
class WeatherToFreemobile():
def __init__(self, config_file):
logging.info('Load configuration from {}'.format(config_file))
@ -20,14 +21,15 @@ class WeatherToFreemobile():
try:
locale.setlocale(locale.LC_TIME, self.config['locale'])
except locale.Error:
logging.warning('Error setting locale {}'.format(self.config['locale']))
logging.warning(
'Error setting locale {}'.format(self.config['locale'])
)
logging.info('Opening OpenWeatherMap API')
apikey = self.config['openweathermap_apikey']
apilanguage = self.config['openweathermap_language']
self.owm = pyowm.OWM(apikey, language=apilanguage)
def send_sms_to_freemobile(self, message):
"""
Sends a SMS using the FreeMobile API