- def child_exited(self, term, pid, status):
+ def child_exited(self, term):
"""Called when a child process exits"""
- self.apt_status = os.WEXITSTATUS(status)
+ self.apt_status = term.get_child_exit_status() self.finished = True
def error(self, pkg, errormsg):
@@ -204,6 +204,7 @@
"""Wait for the child process to exit."""
while not self.finished: self.update_interface()
+ time.sleep(0.02)
return self.apt_status
Here is the diff: gtk2.py' gtk2.py 2011-01-10 17:08:13 +0000 gtk2.py 2011-10-04 14:36:48 +0000
=== modified file 'apt/progress/
--- apt/progress/
+++ apt/progress/
@@ -34,6 +34,7 @@
import gobject as glib
import gobject
import pango
+import time
import vte
import apt_pkg
self. apt_status = -1
self. time_last_ update = time.time() connect( "child- exited" , self.child_exited) connect( "child- exited" , self.child_exited) KEEP_FD= %s" % self.writefd,
"DEBIAN_ FRONTEND= gnome",
"APT_LISTCHANGE S_FRONTEND= gtk"]
self. _context = glib.main_ context_ default( )
@@ -127,16 +128,15 @@
self.term = term
- reaper = vte.reaper_get()
- reaper.
+ self.term.
self.env = ["VTE_PTY_
- def child_exited(self, term, pid, status): status) child_exit_ status( )
self. finished = True
+ def child_exited(self, term):
"""Called when a child process exits"""
- self.apt_status = os.WEXITSTATUS(
+ self.apt_status = term.get_
def error(self, pkg, errormsg):
self. update_ interface( )
@@ -204,6 +204,7 @@
"""Wait for the child process to exit."""
while not self.finished:
+ time.sleep(0.02)
return self.apt_status
if apt_pkg. _COMPAT_ 0_7: