diff options
Diffstat (limited to 'searx/infopage')
| -rw-r--r-- | searx/infopage/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/searx/infopage/__init__.py b/searx/infopage/__init__.py index 3f9426beb..1d556d6d2 100644 --- a/searx/infopage/__init__.py +++ b/searx/infopage/__init__.py @@ -17,6 +17,8 @@ Usage in a Flask app route: """ +from __future__ import annotations + __all__ = ['InfoPage', 'InfoPageSet'] import os @@ -37,6 +39,16 @@ from ..locales import LOCALE_NAMES logger = logging.getLogger('searx.infopage') _INFO_FOLDER = os.path.abspath(os.path.dirname(__file__)) +INFO_PAGES: 'InfoPageSet' + + +def __getattr__(name): + if name == 'INFO_PAGES': + global INFO_PAGES # pylint: disable=global-statement + INFO_PAGES = InfoPageSet() + return INFO_PAGES + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") class InfoPage: |