diff options
author | Simo Sorce <simo@redhat.com> | 2014-06-27 20:26:22 -0400 |
---|---|---|
committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2014-08-27 18:15:03 -0400 |
commit | 71edd1146556eecb9f9375da46313e94bf82874c (patch) | |
tree | 53588020013cf89dd0393f05e24f77f17896af01 /ipsilon/util/page.py | |
parent | 734323ca25765e6eecfa63e41b7f3ec12b084ca3 (diff) | |
download | ipsilon-71edd1146556eecb9f9375da46313e94bf82874c.tar.gz ipsilon-71edd1146556eecb9f9375da46313e94bf82874c.tar.xz ipsilon-71edd1146556eecb9f9375da46313e94bf82874c.zip |
Use new Log class everywhere
Replace copies of _debug function sprinkled all over the code
with a single implementation
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
- Removed replace of self._debug to self.debug
Diffstat (limited to 'ipsilon/util/page.py')
-rwxr-xr-x | ipsilon/util/page.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ipsilon/util/page.py b/ipsilon/util/page.py index aad91fc..10f10aa 100755 --- a/ipsilon/util/page.py +++ b/ipsilon/util/page.py @@ -17,6 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +from ipsilon.util.log import Log from ipsilon.util.user import UserSession from urllib import unquote import cherrypy @@ -33,7 +34,7 @@ def admin_protect(fn): return check -class Page(object): +class Page(Log): def __init__(self, site, form=False): if 'template_env' not in site: raise ValueError('Missing template environment') @@ -96,10 +97,6 @@ class Page(object): m.update(kwargs) return t.render(**m) - def _debug(self, fact): - if cherrypy.config.get('debug', False): - cherrypy.log(fact) - def default(self, *args, **kwargs): raise cherrypy.HTTPError(404) |