Fix pep8 errors
This commit is contained in:
@ -11,6 +11,7 @@ import pyowm
|
|||||||
import requests
|
import requests
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class WeatherToFreemobile():
|
class WeatherToFreemobile():
|
||||||
def __init__(self, config_file):
|
def __init__(self, config_file):
|
||||||
logging.info('Load configuration from {}'.format(config_file))
|
logging.info('Load configuration from {}'.format(config_file))
|
||||||
@ -20,14 +21,15 @@ class WeatherToFreemobile():
|
|||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_TIME, self.config['locale'])
|
locale.setlocale(locale.LC_TIME, self.config['locale'])
|
||||||
except locale.Error:
|
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')
|
logging.info('Opening OpenWeatherMap API')
|
||||||
|
|
||||||
apikey = self.config['openweathermap_apikey']
|
apikey = self.config['openweathermap_apikey']
|
||||||
apilanguage = self.config['openweathermap_language']
|
apilanguage = self.config['openweathermap_language']
|
||||||
self.owm = pyowm.OWM(apikey, language=apilanguage)
|
self.owm = pyowm.OWM(apikey, language=apilanguage)
|
||||||
|
|
||||||
|
|
||||||
def send_sms_to_freemobile(self, message):
|
def send_sms_to_freemobile(self, message):
|
||||||
"""
|
"""
|
||||||
Sends a SMS using the FreeMobile API
|
Sends a SMS using the FreeMobile API
|
||||||
|
Reference in New Issue
Block a user