- More async traceback fixes (Ubuntu #547075).

This commit is contained in:
Tim Waugh 2010-03-26 10:27:50 +00:00
parent adaa22b190
commit 38cc47d62b
2 changed files with 32 additions and 15 deletions

View File

@ -1,31 +1,44 @@
diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py
--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-25 16:36:02.264236367 +0000
+++ system-config-printer-1.2.0/asyncipp.py 2010-03-25 16:36:08.558237409 +0000
@@ -189,20 +189,20 @@ class _IPPConnectionThread(threading.Thr
--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-26 10:26:00.420734896 +0000
+++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 10:26:03.187725661 +0000
@@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr
self._auth_handler = auth_handler
self._auth_queue = Queue.Queue (1)
self.user = None
+ self._destroyed = False
debugprint ("+%s" % self)
def __del__ (self):
@@ -157,6 +158,7 @@ class _IPPConnectionThread(threading.Thr
self._queue.task_done ()
debugprint ("Thread exiting")
+ self._destroyed = True
del self._conn # already destroyed
del self._reply_handler
del self._error_handler
@@ -189,18 +191,20 @@ class _IPPConnectionThread(threading.Thr
def _reply (self, result):
def send_reply (result):
- self._reply_handler (self._conn, result)
+ if self._reply_handler:
+ if not self._destroyed and self._reply_handler:
+ self._reply_handler (self._conn, result)
return False
- if self._reply_handler:
- gobject.idle_add (send_reply, result)
+ gobject.idle_add (send_reply, result)
+ if not self._destroyed and self._reply_handler:
gobject.idle_add (send_reply, result)
def _error (self, exc):
def send_error (exc):
- self._error_handler (self._conn, exc)
+ if self._error_handler:
+ if not self._destroyed and self._error_handler:
+ self._error_handler (self._conn, exc)
return False
- if self._error_handler:
- debugprint ("Add %s to idle" % self._error_handler)
- gobject.idle_add (send_error, exc)
+ debugprint ("Add %s to idle" % self._error_handler)
+ gobject.idle_add (send_error, exc)
+ if not self._destroyed and self._error_handler:
debugprint ("Add %s to idle" % self._error_handler)
gobject.idle_add (send_error, exc)
###
### This is the user-visible class. Although it does not inherit from

View File

@ -7,7 +7,7 @@
Summary: A printer administration tool
Name: system-config-printer
Version: 1.2.0
Release: 9%{?dist}
Release: 10%{?dist}
License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base
@ -125,7 +125,8 @@ printers.
%patch11 -p1 -b .cdi-search-harder
# Fixed traceback in asyncipp (bug #576932).
%patch12 -p1 -b .cdi-search-harder
# More async traceback fixes (Ubuntu #547075).
%patch12 -p1 -b .asyncipp-traceback
# check-device-ids: use correct paths for LSB model URIs.
%patch13 -p1 -b .cdi-lsb-paths
@ -252,6 +253,9 @@ rm -rf %buildroot
exit 0
%changelog
* Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-10
- More async traceback fixes (Ubuntu #547075).
* Thu Mar 25 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-9
- check-device-ids: use correct paths for LSB model URIs.
- Fixed cdi-search-harder patch.