Use new Log class everywhere
[cascardo/ipsilon.git] / ipsilon / login / common.py
index f0efebd..acd6d94 100755 (executable)
@@ -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/>.
 
 # 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.page import Page
 from ipsilon.util.user import UserSession
 from ipsilon.util.plugin import PluginLoader, PluginObject
 from ipsilon.util.page import Page
 from ipsilon.util.user import UserSession
 from ipsilon.util.plugin import PluginLoader, PluginObject
@@ -24,7 +25,7 @@ from ipsilon.util.plugin import PluginInstaller
 import cherrypy
 
 
 import cherrypy
 
 
-class LoginManagerBase(PluginObject):
+class LoginManagerBase(PluginObject, Log):
 
     def __init__(self):
         super(LoginManagerBase, self).__init__()
 
     def __init__(self):
         super(LoginManagerBase, self).__init__()
@@ -68,10 +69,6 @@ class LoginManagerBase(PluginObject):
 
         raise cherrypy.HTTPRedirect(ref)
 
 
         raise cherrypy.HTTPRedirect(ref)
 
-    def _debug(self, fact):
-        if cherrypy.config.get('debug', False):
-            cherrypy.log(fact)
-
     def get_tree(self, site):
         raise NotImplementedError
 
     def get_tree(self, site):
         raise NotImplementedError
 
@@ -108,7 +105,7 @@ class LoginManagerBase(PluginObject):
         if self not in plugins['enabled']:
             return
 
         if self not in plugins['enabled']:
             return
 
-        #remove self from chain
+        # remove self from chain
         root = plugins['root']
         if root.first_login == self:
             root.first_login = self.next_login
         root = plugins['root']
         if root.first_login == self:
             root.first_login = self.next_login