Skip to content

Commit

Permalink
bug fix cached cred
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezza34000 committed Nov 9, 2022
1 parent c663a6b commit d7e9746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/weback_vacuum/WebackApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,13 @@ def save_token_file(self):
"""
try:
config = configparser.ConfigParser()
config.add_section('weback_token')
config.set('weback_token', 'jwt_token', self.jwt_token)
config.set('weback_token', 'token_exp', self.token_exp)
config.set('weback_token', 'api_url', self.api_url)
config.set('weback_token', 'wss_url', self.wss_url)
config.set('weback_token', 'region_name', self.region_name)
with open('weback_creds', 'wb') as configfile:
with open('weback_creds', 'w') as configfile:
config.write(configfile)
_LOGGER.debug(f"WebackApi saved new creds")
except:
Expand Down

0 comments on commit d7e9746

Please sign in to comment.