Esempio n. 1
0
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import imp
import inspect
import logging
import os

import computerjanitor
_ = computerjanitor.setup_gettext()


class Plugin(object):
    """Base class for plugins.
    
    These plugins only do one thing: identify cruft. See the 'get_cruft'
    method for details.
    
    """
    def get_condition(self):
        if hasattr(self, "_condition"):
            return self._condition
        else:
            return []
Esempio n. 2
0
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


import imp
import inspect
import logging
import os

import computerjanitor
_ = computerjanitor.setup_gettext()
import logging

class Plugin(object):

    """Base class for plugins.
    
    These plugins only do one thing: identify cruft. See the 'get_cruft'
    method for details.
    
    """

    def get_condition(self):
        if hasattr(self, "_condition"):
            return self._condition
        else: