summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--text.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 246964cdc..104342cb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2007-03-05 Jeremy Katz <katzj@redhat.com>
+ * text.py (ProgressWindow): Pass ints to snack Scale (#230951)
+
* whiteout.py: Don't import rpm. We don't use it here. And nuke
other old code too.
diff --git a/text.py b/text.py
index bf5e8743a..18d17eecb 100644
--- a/text.py
+++ b/text.py
@@ -114,7 +114,7 @@ class ProgressWindow:
self.scale = None
def set(self, amount):
- self.scale.set(float(amount) * self.multiplier)
+ self.scale.set(int(float(amount) * self.multiplier))
self.screen.refresh()
def refresh(self):
@@ -133,7 +133,7 @@ class ProgressWindow:
g = GridForm(self.screen, title, 1, 2)
g.add(t, 0, 0, (0, 0, 0, 1), anchorLeft=1)
- self.scale = Scale(int(width), float(total) * self.multiplier)
+ self.scale = Scale(int(width), int(float(total) * self.multiplier))
g.add(self.scale, 0, 1)
g.draw()