Merge pull request #591 from soykan/patch-1

Fixing no internet crash (Sun Module)
This commit is contained in:
tobi-wan-kenobi 2020-04-05 13:22:54 +02:00 committed by GitHub
commit 079f87e046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,8 @@ class Module(bumblebee.engine.Module):
def _calculate_times(self):
self._isup = False
try:
if not self._lat or not self._lon:
raise()
sun = Sun(self._lat, self._lon)
except Exception:
self._sunrise = None