Blame plugins/ghost.py

Packit Service 27f74b
# ghost.py, it's a show about nothing.
Packit Service 27f74b
#
Packit Service 27f74b
# Copyright (C) 2013-2015  Red Hat, Inc.
Packit Service 27f74b
#
Packit Service 27f74b
# This copyrighted material is made available to anyone wishing to use,
Packit Service 27f74b
# modify, copy, or redistribute it subject to the terms and conditions of
Packit Service 27f74b
# the GNU General Public License v.2, or (at your option) any later version.
Packit Service 27f74b
# This program is distributed in the hope that it will be useful, but WITHOUT
Packit Service 27f74b
# ANY WARRANTY expressed or implied, including the implied warranties of
Packit Service 27f74b
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
Packit Service 27f74b
# Public License for more details.  You should have received a copy of the
Packit Service 27f74b
# GNU General Public License along with this program; if not, write to the
Packit Service 27f74b
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service 27f74b
# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
Packit Service 27f74b
# source code or documentation are not subject to the GNU General Public
Packit Service 27f74b
# License and may only be used or replicated with the express permission of
Packit Service 27f74b
# Red Hat, Inc.
Packit Service 27f74b
#
Packit Service 27f74b
Packit Service 27f74b
from __future__ import absolute_import
Packit Service 27f74b
from __future__ import unicode_literals
Packit Service 27f74b
from dnfpluginscore import logger
Packit Service 27f74b
Packit Service 27f74b
import dnf
Packit Service 27f74b
Packit Service 27f74b
Packit Service 27f74b
class Ghost(dnf.Plugin):
Packit Service 27f74b
Packit Service 27f74b
    name = 'ghost'
Packit Service 27f74b
Packit Service 27f74b
    def __init__(self, base, cli):
Packit Service 27f74b
        super(Ghost, self).__init__(base, cli)
Packit Service 27f74b
        self.base = base
Packit Service 27f74b
        self.cli = cli
Packit Service 27f74b
        if cli is None:
Packit Service 27f74b
            self._out('loaded.')
Packit Service 27f74b
        else:
Packit Service 27f74b
            self._out('loaded (with CLI)')
Packit Service 27f74b
Packit Service 27f74b
    @staticmethod
Packit Service 27f74b
    def _out(msg):
Packit Service 27f74b
        logger.debug('Ghost plugin: %s', msg)
Packit Service 27f74b
Packit Service 27f74b
    def config(self):
Packit Service 27f74b
        self._out('config')
Packit Service 27f74b
Packit Service 27f74b
    def sack(self):
Packit Service 27f74b
        self._out('sack')
Packit Service 27f74b
Packit Service 27f74b
    def transaction(self):
Packit Service 27f74b
        self._out('transaction')