Add fallback scope

This commit is contained in:
Serene-Arc 2021-07-03 13:54:26 +10:00
parent d5ef991b3a
commit 7f1c929a08

View File

@ -119,7 +119,7 @@ class RedditConnector(metaclass=ABCMeta):
logger.debug('Using authenticated Reddit instance')
if not self.cfg_parser.has_option('DEFAULT', 'user_token'):
logger.log(9, 'Commencing OAuth2 authentication')
scopes = self.cfg_parser.get('DEFAULT', 'scopes')
scopes = self.cfg_parser.get('DEFAULT', 'scopes', fallback='identity, history, read, save')
scopes = OAuth2Authenticator.split_scopes(scopes)
oauth2_authenticator = OAuth2Authenticator(
scopes,