aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-10-20 15:34:35 +0200
committercedricbonhomme <devnull@localhost>2012-10-20 15:34:35 +0200
commit05c1ea04635b143249f3d4065d479642933a38f6 (patch)
tree08669e612728b7fd0e0c6f47f16e9342f0478461 /source
parentRenamed root class. (diff)
downloadnewspipe-05c1ea04635b143249f3d4065d479642933a38f6.tar.gz
newspipe-05c1ea04635b143249f3d4065d479642933a38f6.tar.bz2
newspipe-05c1ea04635b143249f3d4065d479642933a38f6.zip
Added comments.
Diffstat (limited to 'source')
-rwxr-xr-xsource/log.py16
-rwxr-xr-xsource/pyAggr3g470r.py12
2 files changed, 21 insertions, 7 deletions
diff --git a/source/log.py b/source/log.py
index a590c6ce..fdcc3491 100755
--- a/source/log.py
+++ b/source/log.py
@@ -28,9 +28,11 @@ __license__ = "GPLv3"
class Log(object):
"""
+ Log events. Especially events relative to authentication.
"""
def __init__(self):
"""
+ Initialization of the logger.
"""
import logging
self.logger = logging.getLogger("pyaggr3g470r")
@@ -41,13 +43,25 @@ class Log(object):
self.logger.setLevel(logging.INFO)
def info(self, message):
+ """
+ Log notices.
+ """
self.logger.info(message)
def warning(self, message):
+ """
+ Log warnings.
+ """
self.logger.warning(message)
def error(self, message):
+ """
+ Log errors.
+ """
self.logger.warning(message)
def critical(self, message):
- self.logger.critical(message) \ No newline at end of file
+ """
+ Log critical errors.
+ """
+ self.logger.critical(message)
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index b93d873b..f0443384 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -101,11 +101,11 @@ htmlnav = '<body>\n<h1><div class="right innerlogo"><a href="/"><img src="/img/t
' href="http://bitbucket.org/cedricbonhomme/pyaggr3g470r/" rel="noreferrer" target="_blank">' + \
'pyAggr3g470r (source code)</a>'
-class RestrictedArea:
-
- # all methods in this controller (and subcontrollers) is
- # open only to members of the admin group
-
+class RestrictedArea(object):
+ """
+ All methods in this controller (and subcontrollers) is
+ open only to members of the admin group
+ """
_cp_config = {
'auth.require': [member_of('admin')]
}
@@ -116,7 +116,7 @@ class RestrictedArea:
class pyAggr3g470r(object):
"""
- Root class.
+ Main class.
All pages of pyAggr3g470r are described in this class.
"""
_cp_config = {'request.error_response': handle_error, \
bgstack15