From 757977b80c25a02580ee71a03090a36aac31b949 Mon Sep 17 00:00:00 2001 From: Hollow Man <hollowman@hollowman.ml> Date: Mon, 28 Dec 2020 00:41:59 +0800 Subject: [PATCH] Fix 'dnf.history' has no attribute 'open_history' 'open_history' has been deprecated since dnf 3.0.1 in PR 1043 Signed-off-by: Hollow Man <hollowman@hollowman.ml> --- python/dnfdaemon/server/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/dnfdaemon/server/__init__.py b/python/dnfdaemon/server/__init__.py index f13ab00..f49320f 100644 --- a/python/dnfdaemon/server/__init__.py +++ b/python/dnfdaemon/server/__init__.py @@ -699,12 +699,10 @@ class DnfDaemonBase(dbus.service.Object, DownloadCallback): result = (False, ['Transaction not found']) else: old = old[0] - history = dnf.history.open_history(self.base.history) + mobj = dnf.db.history.MergedTransactionWrapper(old) try: # FIXME: Base.history_undo_operations is not public api - #print(len(history.transaction_nevra_ops(old.tid))) - self.base._history_undo_operations( - history.transaction_nevra_ops(old.tid), old.tid) + self.base._history_undo_operations(mobj, old.tid) #print(self.get_transaction()) except dnf.exceptions.PackagesNotInstalledError as err: result = (False, ['An operation cannot be undone : %s' % -- GitLab