- Don't rely on cups-pk-helper being around (bug #556170).

This commit is contained in:
Tim Waugh 2010-01-18 16:59:32 +00:00
parent 1732005a91
commit c6ceea4877
3 changed files with 41 additions and 2 deletions

4
clog1
View File

@ -1,2 +1,2 @@
* Wed Jan 6 2010 Tim Waugh <twaugh@redhat.com> - 1.1.16-3
- Fixed pycups IPPRequest attribute handling bug.
* Mon Jan 18 2010 Tim Waugh <twaugh@redhat.com> - 1.1.16-9
- Don't rely on cups-pk-helper being around (bug #556170).

View File

@ -0,0 +1,36 @@
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

View File

@ -27,6 +27,7 @@ Patch9: system-config-printer-ink-levels.patch
Patch10: system-config-printer-auth-no-pw.patch
Patch11: system-config-printer-copy-crash.patch
Patch12: system-config-printer-check-still-connecting.patch
Patch13: system-config-printer-async-fallback.patch
Patch101: pycups-request-readio.patch
@ -100,6 +101,7 @@ printers.
%patch10 -p1 -b .auth-no-pw
%patch11 -p1 -b .copy-crash
%patch12 -p1 -b .check-still-connecting
%patch13 -p1 -b .async-fallback
pushd pycups-%{pycups_version}
%patch101 -p1 -b .request-readio
@ -221,6 +223,7 @@ exit 0
%changelog
* Mon Jan 18 2010 Tim Waugh <twaugh@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@redhat.com> - 1.1.16-8