Skip to content

Commit

Permalink
updated version 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffykraken committed Feb 28, 2019
1 parent 7d56f2d commit 0a180fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bvgsensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Version History:
# Version 0.1 - initial release
# Version 0.2 - added multiple destinations, optimized error logging
# Version 0.3 fixed encoding, simplified config for direction

from urllib.request import urlopen
import json
Expand Down Expand Up @@ -232,9 +233,9 @@ def isCacheValid(self):
self._cache_creation_date = os.path.getmtime("{}{}".format(self.file_path, self.file_name))
td = self._cache_creation_date - date_now
td = td.seconds
_LOGGER.warning("td is: {}".format(td))
_LOGGER.debug("td is: {}".format(td))
if td > (self._cache_size * 60):
_LOGGER.warning("Cache Age (not valid): {}".format(td // 60))
_LOGGER.debug("Cache Age (not valid): {}".format(td // 60))
return False
else:
return True

0 comments on commit 0a180fc

Please sign in to comment.