From d3cb8e6be5215b9f8b508337b077952ac75ef91d Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 31 Jan 2021 17:52:35 -0600 Subject: [PATCH] Import BrowserCache earlier so brotli-dict loads correctly. --- fanficfare/configurable.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fanficfare/configurable.py b/fanficfare/configurable.py index 9dc54668..f6b85a1f 100644 --- a/fanficfare/configurable.py +++ b/fanficfare/configurable.py @@ -41,6 +41,9 @@ except ImportError: from . import exceptions from . import fetcher +## has to be up here for brotli-dict to load correctly. +from .browsercache import BrowserCache + logger = logging.getLogger(__name__) # All of the writers(epub,html,txt) and adapters(ffnet,twlt,etc) @@ -976,7 +979,6 @@ class Configuration(ConfigParser): ## make a data list of decorators to re-apply if ## there are many more. if self.browsercache is None: - from .browsercache import BrowserCache self.browsercache = BrowserCache(self.getConfig("chrome_cache_path")) fetcher.BrowserCacheDecorator(self.browsercache).decorate_fetcher(self.fetcher) except Exception as e: