Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minidnf use unload plugins #35

Merged
merged 1 commit into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/otopi/minidnf.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,15 @@ def _createBase(self, offline=False):

def _destroyBase(self, base):
if base is not None:
self._sink.verbose(_('Calling _plugins._unload'))
base._plugins._unload()
if hasattr(base, 'unload_plugins'):
# Added in https://bugzilla.redhat.com/2047251
self._sink.verbose(_('Calling base.unload_plugins'))
base.unload_plugins()
else:
# TODO: Consider removing this part once we do not want
# to support older dnf versions.
self._sink.verbose(_('Calling _plugins._unload'))
base._plugins._unload()
base.close()

def _queuePackages(
Expand Down