Skip to content

Commit

Permalink
PLUGIN_CONF is not needed anymore in argument of self.read_config wit…
Browse files Browse the repository at this point in the history
…h newer DNF
  • Loading branch information
fepitre committed Sep 14, 2017
1 parent 11f86ca commit 8fffaad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions misc/dnf-qubes-hooks.py
Expand Up @@ -24,8 +24,6 @@
import dnf
import subprocess

PLUGIN_CONF = 'qubes-hooks'

class QubesHooks(dnf.Plugin):
name = 'qubes-hooks'

Expand All @@ -35,7 +33,7 @@ def __init__(self, base, cli):
self.log = logging.getLogger('dnf')

def transaction(self):
config = self.read_config(self.base.conf, PLUGIN_CONF)
config = self.read_config(self.base.conf)

if config.getboolean('main', 'notify-updates'):
# Get all updates available _before_ this transaction
Expand Down

3 comments on commit 8fffaad

@marmarek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ough, this means we can't use the same code for fc25 and fc26.
Try wrapping it with try/except TypeError.

@marmarek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://dnf.readthedocs.io/en/latest/dnf-1_vs_dnf-2.html


Following API methods accept different arguments

    dnf.Base.add_remote_rpms()
    dnf.Base.group_install()
    dnf.cli.Command.configure()
    dnf.cli.Command.run()
    dnf.Plugin.read_config()

@fepitre
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I will adapt it to be compatible easily with Qubes 3.2 and 4.x.

Please sign in to comment.