From: Michael Tremer Date: Sat, 9 Apr 2011 15:20:50 +0000 (+0200) Subject: Remove plugins (we don't need it). X-Git-Tag: 0.9.3~47^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3ffe0770f7718dd749fc07326f512d80f31cbb0;p=pakfire.git Remove plugins (we don't need it). --- diff --git a/pakfire/plugins/__init__.py b/pakfire/plugins/__init__.py deleted file mode 100644 index ab17879ef..000000000 --- a/pakfire/plugins/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/python - -import logging - -class Plugins(object): - allowed_methods = ["init",] - - def __init__(self, pakfire): - self.pakfire = pakfire - - self.__plugins = [] - - def register_plugin(self, plugin): - # Create instance of plugin - plugin = plugin(self.pakfire) - - self.__plugins.append(plugin) - - def run(self, method, *args, **kwargs): - if not method in self.allowed_methods: - raise Exception, "Unallowed method called '%s'" % method - - logging.debug("Running plugin method '%s'" % method) - - for plugin in self.__plugins: - func = getattr(plugin, method, None) - if not func: - continue - - func(*args, **kwargs) diff --git a/pakfire/plugins/base.py b/pakfire/plugins/base.py deleted file mode 100644 index beb8bf983..000000000 --- a/pakfire/plugins/base.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/python - -class Plugin(object): - def __init__(self, pakfire): - self.pakfire = pakfire - - self.init() - - def init(self): - """ - Initialization function that it to be overwritten - by the actual plugin. - """ - pass diff --git a/po/POTFILES.in b/po/POTFILES.in index ee615c0db..1a1127a0c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -21,8 +21,6 @@ pakfire/packages/packager.py pakfire/packages/source.py pakfire/packages/util.py pakfire/packages/virtual.py -pakfire/plugins/base.py -pakfire/plugins/__init__.py pakfire/repository/base.py pakfire/repository/cache.py pakfire/repository/database.py diff --git a/po/pakfire.pot b/po/pakfire.pot index 9c78be8d0..cd8dede65 100644 --- a/po/pakfire.pot +++ b/po/pakfire.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-04-09 17:16+0200\n" +"POT-Creation-Date: 2011-04-09 17:20+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/setup.py b/setup.py index 808a65d63..601ec3853 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,6 @@ setup( packages = [ "pakfire", "pakfire.packages", - "pakfire.plugins", "pakfire.server", "pakfire.repository", ],