# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ipsilon.util.plugin import PluginLoader, PluginObject
+from ipsilon.util.plugin import PluginInstaller
from ipsilon.util.page import Page
import cherrypy
+class ProviderException(Exception):
+
+ def __init__(self, message):
+ super(ProviderException, self).__init__(message)
+ self.message = message
+
+ 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):
def __init__(self, name, path):
def _debug(self, fact):
if cherrypy.config.get('debug', False):
cherrypy.log(fact)
+
+
+class ProvidersInstall(object):
+
+ def __init__(self):
+ pi = PluginInstaller(ProvidersInstall)
+ self.plugins = pi.get_plugins()