diff --git a/lnetatmo.py b/lnetatmo.py index b2ea9d39..4bd354c0 100644 --- a/lnetatmo.py +++ b/lnetatmo.py @@ -484,6 +484,8 @@ def __init__(self, authData, home=None, station=None): "access_token" : self.getAuthToken } resp = postRequest("Weather station", _GETSTATIONDATA_REQ, postParams) + if not resp: + raise AuthFailure("No response received from server.") self.rawData = resp['body']['devices'] # Weather data if not self.rawData : raise NoDevice("No weather station in any homes")