mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Add docstrings to the HTTP server callbacks
This commit is contained in:
parent
13e4f45e30
commit
ef5438e937
@ -103,6 +103,8 @@ class SupyHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||||||
|
|
||||||
|
|
||||||
class SupyHTTPServerCallback:
|
class SupyHTTPServerCallback:
|
||||||
|
"""This is a base class that should be overriden by any plugin that want
|
||||||
|
to have a Web interface."""
|
||||||
name = "Unnamed plugin"
|
name = "Unnamed plugin"
|
||||||
defaultResponse = """
|
defaultResponse = """
|
||||||
This is a default response of the Supybot HTTP server. If you see this
|
This is a default response of the Supybot HTTP server. If you see this
|
||||||
@ -121,6 +123,7 @@ class SupyHTTPServerCallback:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class Supy404(SupyHTTPServerCallback):
|
class Supy404(SupyHTTPServerCallback):
|
||||||
|
"""A 404 Not Found error."""
|
||||||
name = "Error 404"
|
name = "Error 404"
|
||||||
response = """
|
response = """
|
||||||
I am a pretty clever IRC bot, but I suck at serving Web pages, particulary
|
I am a pretty clever IRC bot, but I suck at serving Web pages, particulary
|
||||||
@ -135,6 +138,7 @@ class Supy404(SupyHTTPServerCallback):
|
|||||||
self.wfile.write(self.response)
|
self.wfile.write(self.response)
|
||||||
|
|
||||||
class SupyIndex(SupyHTTPServerCallback):
|
class SupyIndex(SupyHTTPServerCallback):
|
||||||
|
"""Displays the index of available plugins."""
|
||||||
name = "index"
|
name = "index"
|
||||||
defaultResponse = "Request not handled."""
|
defaultResponse = "Request not handled."""
|
||||||
template = """
|
template = """
|
||||||
|
Loading…
Reference in New Issue
Block a user