Fixing no internet crash

This commit is contained in:
Soykan Ertürk 2020-04-05 13:29:56 +03:00 committed by GitHub
parent efb67357cf
commit 62fac70309
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): def _calculate_times(self):
self._isup = False self._isup = False
try: try:
if not self._lat or not self._lon:
raise()
sun = Sun(self._lat, self._lon) sun = Sun(self._lat, self._lon)
except Exception: except Exception:
self._sunrise = None self._sunrise = None