1
0
Fork 0
mirror of synced 2024-05-04 20:32:45 +12:00

Immediately write token to disk in case it is unused

This commit is contained in:
Serene-Arc 2021-03-09 19:51:48 +10:00 committed by Ali Parlakci
parent cfd92a8d14
commit 14b63487bc

View file

@ -87,6 +87,8 @@ class RedditDownloader:
self.cfg_parser.get('DEFAULT', 'client_secret'))
token = oauth2_authenticator.retrieve_new_token()
self.cfg_parser['DEFAULT']['user_token'] = token
with open(self.config_location, 'w') as file:
self.cfg_parser.write(file, True)
token_manager = OAuth2TokenManager(self.cfg_parser, self.config_location)
self.authenticated = True