Add docstrings to the HTTP server callbacks

This commit is contained in:
Valentin Lorentz 2011-06-24 14:52:01 +02:00
parent 13e4f45e30
commit ef5438e937
1 changed files with 4 additions and 0 deletions

View File

@ -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 = """