summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-07-17 19:54:40 +0000
committerMatt Wilson <msw@redhat.com>2000-07-17 19:54:40 +0000
commit315d28452630de867e350131c78e925fd7fdbc54 (patch)
tree8939c675efd95f615f68fb6442397ea6be3b311a /text.py
parent3da8e3ff92ee5dd457aa0f2aac0c9f3d047a2a29 (diff)
downloadanaconda-315d28452630de867e350131c78e925fd7fdbc54.tar.gz
anaconda-315d28452630de867e350131c78e925fd7fdbc54.tar.xz
anaconda-315d28452630de867e350131c78e925fd7fdbc54.zip
fix integer overflow
Diffstat (limited to 'text.py')
-rw-r--r--text.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/text.py b/text.py
index 4c91c239d..184a652b0 100644
--- a/text.py
+++ b/text.py
@@ -550,9 +550,9 @@ class InstallProgressWindow:
self.numComplete = self.numComplete + 1
self.sizeComplete = self.sizeComplete + header[rpm.RPMTAG_SIZE]
self.numCompleteW.setText("%12d" % self.numComplete)
- self.sizeCompleteW.setText("%10dM" % (self.sizeComplete / (1024 * 1024)))
+ self.sizeCompleteW.setText("%10dM" % (self.sizeComplete))
self.numRemainingW.setText("%12d" % (self.numTotal - self.numComplete))
- self.sizeRemainingW.setText("%10dM" % ((self.sizeTotal - self.sizeComplete) / (1024 * 1024)))
+ self.sizeRemainingW.setText("%10dM" % (self.sizeTotal - self.sizeComplete))
self.total.set(self.sizeComplete)
elapsedTime = time.time() - self.timeStarted
@@ -622,7 +622,7 @@ class InstallProgressWindow:
overall.setField (Label (_("Total :")), 0, 1, anchorLeft = 1)
overall.setField (Label ("%12d" % total), 1, 1, anchorLeft = 1)
- overall.setField (Label ("%10dM" % (totalSize / (1024 * 1024))),
+ overall.setField (Label ("%10dM" % (totalSize)),
2, 1, anchorLeft = 1)
self.timeTotalW = Label("")
overall.setField(self.timeTotalW, 3, 1, anchorLeft = 1)
@@ -632,14 +632,14 @@ class InstallProgressWindow:
self.numCompleteW = Label("%12d" % self.numComplete)
overall.setField(self.numCompleteW, 1, 2, anchorLeft = 1)
self.sizeComplete = 0
- self.sizeCompleteW = Label("%10dM" % (self.sizeComplete / (1024 * 1024)))
+ self.sizeCompleteW = Label("%10dM" % (self.sizeComplete))
overall.setField(self.sizeCompleteW, 2, 2, anchorLeft = 1)
self.timeCompleteW = Label("")
overall.setField(self.timeCompleteW, 3, 2, anchorLeft = 1)
overall.setField (Label (_("Remaining: ")), 0, 3, anchorLeft = 1)
self.numRemainingW = Label("%12d" % total)
- self.sizeRemainingW = Label("%10dM" % (totalSize / (1024 * 1024)))
+ self.sizeRemainingW = Label("%10dM" % (totalSize))
overall.setField(self.numRemainingW, 1, 3, anchorLeft = 1)
overall.setField(self.sizeRemainingW, 2, 3, anchorLeft = 1)
self.timeRemainingW = Label("")