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