44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 5b0c4856f50f1a54ca39eb38691655cab43ba143 Mon Sep 17 00:00:00 2001
|
|
From: Adam Williamson <awilliam@redhat.com>
|
|
Date: Tue, 26 Jun 2018 14:02:59 -0700
|
|
Subject: [PATCH] DNF 3: progress callback constants moved to dnf.transaction
|
|
|
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
|
---
|
|
src/pylorax/dnfhelper.py | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/pylorax/dnfhelper.py b/src/pylorax/dnfhelper.py
|
|
index 39aadd56..aa1f9804 100644
|
|
--- a/src/pylorax/dnfhelper.py
|
|
+++ b/src/pylorax/dnfhelper.py
|
|
@@ -23,6 +23,7 @@
|
|
import logging
|
|
logger = logging.getLogger("pylorax.dnfhelper")
|
|
import dnf
|
|
+import dnf.transaction
|
|
import collections
|
|
import time
|
|
import pylorax.output as output
|
|
@@ -93,7 +94,7 @@ class LoraxRpmCallback(dnf.callback.TransactionProgress):
|
|
self._last_ts = None
|
|
|
|
def progress(self, package, action, ti_done, ti_total, ts_done, ts_total):
|
|
- if action == self.PKG_INSTALL:
|
|
+ if action == dnf.transaction.PKG_INSTALL:
|
|
# do not report same package twice
|
|
if self._last_ts == ts_done:
|
|
return
|
|
@@ -101,7 +102,7 @@ class LoraxRpmCallback(dnf.callback.TransactionProgress):
|
|
|
|
msg = '(%d/%d) %s' % (ts_done, ts_total, package)
|
|
logger.info(msg)
|
|
- elif action == self.TRANS_POST:
|
|
+ elif action == dnf.transaction.TRANS_POST:
|
|
msg = "Performing post-installation setup tasks"
|
|
logger.info(msg)
|
|
|
|
--
|
|
2.18.0.rc2
|
|
|