- Use upstream fix for async bugs.
This commit is contained in:
parent
1fcc63811b
commit
d52b8a8427
@ -1,6 +1,6 @@
|
||||
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-26 12:50:39.829627667 +0000
|
||||
+++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 12:50:51.888627367 +0000
|
||||
--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-27 10:12:14.667366971 +0000
|
||||
+++ system-config-printer-1.2.0/asyncipp.py 2010-03-27 10:13:04.081365616 +0000
|
||||
@@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr
|
||||
self._auth_handler = auth_handler
|
||||
self._auth_queue = Queue.Queue (1)
|
||||
@ -49,3 +49,59 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-confi
|
||||
|
||||
###
|
||||
### This is the user-visible class. Although it does not inherit from
|
||||
diff -up system-config-printer-1.2.0/asyncpk1.py.asyncipp-traceback system-config-printer-1.2.0/asyncpk1.py
|
||||
--- system-config-printer-1.2.0/asyncpk1.py.asyncipp-traceback 2010-03-27 10:12:14.702364469 +0000
|
||||
+++ system-config-printer-1.2.0/asyncpk1.py 2010-03-27 10:13:06.407243790 +0000
|
||||
@@ -64,6 +64,7 @@ class _PK1AsyncMethodCall:
|
||||
self._fallback_fn = fallback_fn
|
||||
self._fallback_args = args
|
||||
self._fallback_kwds = kwds
|
||||
+ self._destroyed = False
|
||||
debugprint ("+_PK1AsyncMethodCall: %s" % self)
|
||||
|
||||
def __del__ (self):
|
||||
@@ -85,6 +86,7 @@ class _PK1AsyncMethodCall:
|
||||
|
||||
def _destroy (self):
|
||||
debugprint ("DESTROY: %s" % self)
|
||||
+ self._destroyed = True
|
||||
del self._bus
|
||||
del self._conn
|
||||
del self._pk_method_name
|
||||
@@ -97,6 +99,9 @@ class _PK1AsyncMethodCall:
|
||||
del self._fallback_kwds
|
||||
|
||||
def _pk_reply_handler (self, error, *args):
|
||||
+ if self._destroyed:
|
||||
+ return
|
||||
+
|
||||
if str (error) == '':
|
||||
self._client_reply_handler (self._conn, self._unpack_fn (*args))
|
||||
self._destroy ()
|
||||
@@ -106,6 +111,9 @@ class _PK1AsyncMethodCall:
|
||||
self.call_fallback_fn ()
|
||||
|
||||
def _pk_error_handler (self, exc):
|
||||
+ if self._destroyed:
|
||||
+ return
|
||||
+
|
||||
if exc.get_dbus_name () == CUPS_PK_NEED_AUTH:
|
||||
exc = cups.IPPError (cups.IPP_NOT_AUTHORIZED, 'pkcancel')
|
||||
self._client_error_handler (self._conn, exc)
|
||||
@@ -123,10 +131,16 @@ class _PK1AsyncMethodCall:
|
||||
self._fallback_fn (*self._fallback_args, **self._fallback_kwds)
|
||||
|
||||
def _ipp_reply_handler (self, conn, *args):
|
||||
+ if self._destroyed:
|
||||
+ return
|
||||
+
|
||||
self._client_reply_handler (self._conn, *args)
|
||||
self._destroy ()
|
||||
|
||||
def _ipp_error_handler (self, conn, *args):
|
||||
+ if self._destroyed:
|
||||
+ return
|
||||
+
|
||||
self._client_error_handler (self._conn, *args)
|
||||
self._destroy ()
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: A printer administration tool
|
||||
Name: system-config-printer
|
||||
Version: 1.2.0
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://cyberelk.net/tim/software/system-config-printer/
|
||||
Group: System Environment/Base
|
||||
@ -258,6 +258,9 @@ rm -rf %buildroot
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Sat Mar 27 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-12
|
||||
- Use upstream fix for async bugs.
|
||||
|
||||
* Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-11
|
||||
- More async traceback fixes (Ubuntu #547075).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user