Fix unused-variables errors found by pylint

This commit is contained in:
Frederic Junod 2017-10-18 08:36:07 +02:00
parent 851be18d72
commit 70a58715f3
4 changed files with 5 additions and 6 deletions

View file

@ -59,9 +59,9 @@ class Module(bumblebee.engine.Module):
def update(self, widgets):
timestamp = int(time.time())
if self._nextcheck < int(time.time()):
if self._nextcheck < timestamp:
self._data = []
self._nextcheck = int(time.time()) + self._interval*60
self._nextcheck = timestamp + self._interval*60
for symbol in self._symbols:
url = API_URL.format(self._base, symbol)
try:

View file

@ -83,9 +83,9 @@ class Module(bumblebee.engine.Module):
def update(self, widgets):
timestamp = int(time.time())
if self._nextcheck < int(time.time()):
if self._nextcheck < timestamp:
try:
self._nextcheck = int(time.time()) + self._interval*60
self._nextcheck = timestamp + self._interval*60
weather_url = "http://api.openweathermap.org/data/2.5/weather?appid={}".format(self._apikey)
weather_url = "{}&units={}".format(weather_url, self._unit)
if self._location == "auto":