diff --git a/gallery_dl/cache.py b/gallery_dl/cache.py index b95b43de..742dbea3 100644 --- a/gallery_dl/cache.py +++ b/gallery_dl/cache.py @@ -213,6 +213,6 @@ memcache = build_cache_decorator(MEMCACHE) try: DBCACHE = DatabaseCache() cache = build_cache_decorator(MEMCACHE, DBCACHE) -except RuntimeError(): +except (RuntimeError, sqlite3.OperationalError): DBCACHE = None cache = memcache diff --git a/gallery_dl/config.py b/gallery_dl/config.py index 662ce826..88fede98 100644 --- a/gallery_dl/config.py +++ b/gallery_dl/config.py @@ -23,9 +23,7 @@ _config = {} if os.name == "nt": _default_configs = [ - r"~\.config\gallery-dl\config.json", r"%USERPROFILE%\gallery-dl\config.json", - r"~\.gallery-dl.conf", r"%USERPROFILE%\gallery-dl.conf", ] else: diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 5cd2f7a6..8f27d14f 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -18,7 +18,7 @@ from .. import config class Downloader(BasicDownloader): - max_tries = config.interpolate(("downloader", "http", "retries",), 5) + retries = config.interpolate(("downloader", "http", "retries",), 5) timeout = config.interpolate(("downloader", "http", "timeout",), None) def __init__(self, output): @@ -32,8 +32,8 @@ class Downloader(BasicDownloader): while True: tries += 1 if tries > 1: - self.out.error(pathfmt.path, msg, tries-1, self.max_tries) - if tries > self.max_tries: + self.out.error(pathfmt.path, msg, tries-1, self.retries) + if tries > self.retries: return time.sleep(1) diff --git a/test/test_extractors.py b/test/test_extractors.py index 6419c215..7d13ec50 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -18,8 +18,8 @@ class TestExtractors(unittest.TestCase): name = "gallerydl" email = "gallerydl@openaliasbox.org" config.set(("cache", "file"), ":memory:") - config.set(("username",), name) - config.set(("password",), name) + config.set(("extractor", "username"), name) + config.set(("extractor", "password"), name) config.set(("extractor", "nijie", "username"), email) config.set(("extractor", "seiga", "username"), email)