# FIXME: make this a decorator (just like the withResolverLog())
def updateGUI(self, view, lock):
+ progress = view.getOpCacheProgress()
+ i = 0
+ step = 1
while lock.locked():
+ i += step
+ progress.update(i)
+ if i == 100:
+ step = -1
+ elif i == 0:
+ step = 1 view.processEvents() time.sleep(0.03)
but for some reason this seems to crash on the qt frontend of the release upgrader (segfault deep in libqt).
One simple way to keep the UI alive is:
=== modified file 'DistUpgrade/ DistUpgradeCach e.py' DistUpgradeCach e.py 2010-04-12 14:47:37 +0000 DistUpgradeCach e.py 2010-04-12 16:26:24 +0000
--- DistUpgrade/
+++ DistUpgrade/
@@ -574,7 +574,16 @@
# FIXME: make this a decorator (just like the withResolverLog()) Progress( )
view. processEvents( )
time. sleep(0. 03)
def updateGUI(self, view, lock):
+ progress = view.getOpCache
+ i = 0
+ step = 1
while lock.locked():
+ i += step
+ progress.update(i)
+ if i == 100:
+ step = -1
+ elif i == 0:
+ step = 1
but for some reason this seems to crash on the qt frontend of the release upgrader (segfault deep in libqt).