X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fipsilon.git;a=blobdiff_plain;f=ipsilon%2Fproviders%2Fcommon.py;fp=ipsilon%2Fproviders%2Fcommon.py;h=94f747a3e54540b92ddfa4286f8eefb35e7a73c1;hp=b1eab1a02fa87f5436d7ecb558bd102a2d79628a;hb=71edd1146556eecb9f9375da46313e94bf82874c;hpb=734323ca25765e6eecfa63e41b7f3ec12b084ca3 diff --git a/ipsilon/providers/common.py b/ipsilon/providers/common.py index b1eab1a..94f747a 100755 --- a/ipsilon/providers/common.py +++ b/ipsilon/providers/common.py @@ -17,13 +17,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from ipsilon.util.log import Log from ipsilon.util.plugin import PluginLoader, PluginObject from ipsilon.util.plugin import PluginInstaller from ipsilon.util.page import Page import cherrypy -class ProviderException(Exception): +class ProviderException(Exception, Log): def __init__(self, message): super(ProviderException, self).__init__(message) @@ -32,10 +33,6 @@ class ProviderException(Exception): def __str__(self): return repr(self.message) - def _debug(self, fact): - if cherrypy.config.get('debug', False): - cherrypy.log('%s: %s' % (self.__class__.__name__, fact)) - class ProviderBase(PluginObject): @@ -46,10 +43,6 @@ class ProviderBase(PluginObject): self.tree = None self.admin = None - def _debug(self, fact): - if cherrypy.config.get('debug', False): - cherrypy.log(fact) - def get_tree(self, site): raise NotImplementedError @@ -136,7 +129,7 @@ class ProviderPageBase(Page): FACILITY = 'provider_config' -class LoadProviders(object): +class LoadProviders(Log): def __init__(self, root, site): loader = PluginLoader(LoadProviders, FACILITY, 'IdpProvider') @@ -151,10 +144,6 @@ class LoadProviders(object): plugin = providers['available'][item] plugin.register(site) - def _debug(self, fact): - if cherrypy.config.get('debug', False): - cherrypy.log(fact) - class ProvidersInstall(object):