diff --git a/lib/adapter/adapter.py b/lib/adapter/adapter.py index 94f544a..7dce5e1 100644 --- a/lib/adapter/adapter.py +++ b/lib/adapter/adapter.py @@ -78,6 +78,16 @@ class Adapter(with_metaclass(AdapterMC, object)): """ return self._cache_needed + @staticmethod + def _format_page(text): + """ + Preformatting page hook. + Converts `text` (as in the initial repository) + to text (as to be displayed). + """ + + return text + @abc.abstractmethod def _get_page(self, topic, request_options=None): """ diff --git a/lib/globals.py b/lib/globals.py index ef086b0..c026e10 100644 --- a/lib/globals.py +++ b/lib/globals.py @@ -85,6 +85,11 @@ COLOR_STYLES = sorted(list(get_all_styles())) MALFORMED_RESPONSE_HTML_PAGE = open(os.path.join(STATIC, 'malformed-response.html')).read() def fatal(text): + """ + Fatal error function. + + The function is being used in the standalone mode only + """ sys.stderr.write("ERROR: %s\n" % text) sys.exit(1)