From 38c05df290f776e3409f47e1b62fd8d5ba283fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 2 Dec 2019 23:41:02 +0100 Subject: [PATCH] [oauth] add custom/default indicator to log messages (#501) --- gallery_dl/oauth.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gallery_dl/oauth.py b/gallery_dl/oauth.py index 3093a729..9ceefbf3 100644 --- a/gallery_dl/oauth.py +++ b/gallery_dl/oauth.py @@ -115,14 +115,15 @@ class OAuth1API(): api_secret = extractor.config("api-secret", self.API_SECRET) token = extractor.config("access-token") token_secret = extractor.config("access-token-secret") + key_type = "default" if api_key == self.API_KEY else "custom" if api_key and api_secret and token and token_secret: - self.log.debug("Using OAuth1.0 authentication") + self.log.debug("Using %s OAuth1.0 authentication", key_type) self.session = OAuth1Session( api_key, api_secret, token, token_secret) self.api_key = None else: - self.log.debug("Using api_key authentication") + self.log.debug("Using %s api_key authentication", key_type) self.session = extractor.session self.api_key = api_key