rpms/system-config-printer/F-11 system-config-printer-async-fallback.patch, NONE, 1.1 system-config-printer.spec, 1.333, 1.334

Tim Waugh twaugh at fedoraproject.org
Mon Jan 18 16:57:54 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/system-config-printer/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15986

Modified Files:
	system-config-printer.spec 
Added Files:
	system-config-printer-async-fallback.patch 
Log Message:
* Mon Jan 18 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-9
- Don't rely on cups-pk-helper being around (bug #556170).


system-config-printer-async-fallback.patch:
 asyncpk1.py |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

--- NEW FILE system-config-printer-async-fallback.patch ---
diff -up system-config-printer-1.1.16/asyncpk1.py.async-fallback system-config-printer-1.1.16/asyncpk1.py
--- system-config-printer-1.1.16/asyncpk1.py.async-fallback	2009-12-22 14:27:37.000000000 +0000
+++ system-config-printer-1.1.16/asyncpk1.py	2010-01-18 16:53:36.820434799 +0000
@@ -288,18 +288,24 @@ class PK1Connection:
     def _call_with_pk (self, use_pycups, pk_method_name, pk_args,
                        reply_handler, error_handler, unpack_fn,
                        fallback_fn, args, kwds):
-        asyncmethodcall = _PK1AsyncMethodCall (self._system_bus, self,
-                                               pk_method_name, pk_args,
-                                               reply_handler, error_handler,
-                                               unpack_fn, fallback_fn,
-                                               args, kwds)
+        if not use_pycups:
+            try:
+                asyncmethodcall = _PK1AsyncMethodCall (self._system_bus, self,
+                                                       pk_method_name, pk_args,
+                                                       reply_handler,
+                                                       error_handler,
+                                                       unpack_fn, fallback_fn,
+                                                       args, kwds)
+
+                debugprint ("Calling PK method %s" % pk_method_name)
+                asyncmethodcall.call ()
+            except dbus.DBusException, e:
+                debugprint ("D-Bus call failed: %s" % repr (e))
+                use_pycups = True
 
         if use_pycups:
             return asyncmethodcall.call_fallback_fn ()
 
-        debugprint ("Calling PK method %s" % pk_method_name)
-        asyncmethodcall.call ()
-
     def _nothing_to_unpack (self):
         return None
 


Index: system-config-printer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/system-config-printer/F-11/system-config-printer.spec,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -p -r1.333 -r1.334
--- system-config-printer.spec	18 Jan 2010 16:35:55 -0000	1.333
+++ system-config-printer.spec	18 Jan 2010 16:57:54 -0000	1.334
@@ -26,6 +26,7 @@ Patch8: system-config-printer-ink-levels
 Patch9: system-config-printer-auth-no-pw.patch
 Patch10: system-config-printer-copy-crash.patch
 Patch11: system-config-printer-check-still-connecting.patch
+Patch12: system-config-printer-async-fallback.patch
 
 Patch101: pycups-request-readio.patch
 
@@ -87,6 +88,7 @@ the configuration tool.
 %patch9 -p1 -b .auth-no-pw
 %patch10 -p1 -b .copy-crash
 %patch11 -p1 -b .check-still-connecting
+%patch12 -p1 -b .async-fallback
 
 pushd pycups-%{pycups_version}
 %patch101 -p1 -b .request-readio
@@ -198,6 +200,7 @@ exit 0
 
 %changelog
 * Mon Jan 18 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-9
+- Don't rely on cups-pk-helper being around (bug #556170).
 - Avoid traceback when checking on connecting backends (bug #555552).
 
 * Mon Jan 11 2010 Tim Waugh <twaugh at redhat.com> - 1.1.16-8



More information about the scm-commits mailing list