mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
a couple of functions documented
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user