summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-03-16 20:41:18 +0000
committerMatt Wilson <msw@redhat.com>2001-03-16 20:41:18 +0000
commit1bb7a833d08fee68703249eb732f7a691554d865 (patch)
treef25bb18da557a99f387ceb431f085ac2e463160e /iw
parentb88c1be173ddaab3f2acd492c8828886b5f60b57 (diff)
downloadanaconda-1bb7a833d08fee68703249eb732f7a691554d865.tar.gz
anaconda-1bb7a833d08fee68703249eb732f7a691554d865.tar.xz
anaconda-1bb7a833d08fee68703249eb732f7a691554d865.zip
1) print out the traceback before we try to format it (just for sanity sake)
2) if the number of packages to be installed/upgraded is less than the number of images you have for the ads, you'll get a mod by 0 error. Prevent that.
Diffstat (limited to 'iw')
-rw-r--r--iw/progress_gui.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/iw/progress_gui.py b/iw/progress_gui.py
index a67a0179b..295dae663 100644
--- a/iw/progress_gui.py
+++ b/iw/progress_gui.py
@@ -34,6 +34,10 @@ class DoInstall (Thread):
os.kill(os.getpid(), signal.SIGTERM)
except:
+ import traceback
+ list = apply(traceback.format_exception, sys.exc_info())
+ text = string.joinfields (list, "")
+ print text
threads_enter ()
handleException(self.todo, sys.exc_info())
threads_enter ()
@@ -117,7 +121,10 @@ class InstallProgressWindow (InstallWindow):
def setPackage(self, header):
threads_enter ()
if len(self.pixmaps):
- if not (self.numComplete) % (self.numTotal / len(self.pixmaps)):
+ pkgsPerImage = self.numTotal / len(self.pixmaps)
+ if pkgsPerImage < 1:
+ pkgsPerImage = 1
+ if not (self.numComplete) % pkgsPerImage:
if self.numComplete:
num = self.numComplete * len(self.pixmaps) / self.numTotal
else: