We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa8700b commit 7812f30Copy full SHA for 7812f30
lnetatmo.py
@@ -254,8 +254,9 @@ def renew_token(self):
254
cred = {"CLIENT_ID":self._clientId,
255
"CLIENT_SECRET":self._clientSecret,
256
"REFRESH_TOKEN":self.refreshToken }
257
- with open(self._credentialFile, "w") as f:
258
- f.write(json.dumps(cred, indent=True))
+ if hasattr(type(self), "_credentialFile"):
+ with open(self._credentialFile, "w") as f:
259
+ f.write(json.dumps(cred, indent=True))
260
self._accessToken = resp['access_token']
261
self.expiration = int(resp['expire_in'] + time.time())
262
0 commit comments