mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
[oauth] warn when cache is enabled but not writeable (#4771)
This commit is contained in:
parent
2e4bf54644
commit
17e710c4bf
@ -11,7 +11,7 @@
|
||||
from .common import Extractor, Message
|
||||
from .. import text, oauth, util, config, exception
|
||||
from ..output import stdout_write
|
||||
from ..cache import cache
|
||||
from ..cache import cache, memcache
|
||||
import urllib.parse
|
||||
import binascii
|
||||
import hashlib
|
||||
@ -31,6 +31,9 @@ class OAuthBase(Extractor):
|
||||
|
||||
def _init(self):
|
||||
self.cache = config.get(("extractor", self.category), "cache", True)
|
||||
if self.cache and cache is memcache:
|
||||
self.log.warning("cache file is not writeable")
|
||||
self.cache = False
|
||||
|
||||
def oauth_config(self, key, default=None):
|
||||
value = config.interpolate(("extractor", self.subcategory), key)
|
||||
|
Loading…
Reference in New Issue
Block a user