56 lines
2.6 KiB
Diff
56 lines
2.6 KiB
Diff
diff -up system-config-printer-1.3.7/asyncipp.py.auth system-config-printer-1.3.7/asyncipp.py
|
|
--- system-config-printer-1.3.7/asyncipp.py.auth 2011-10-03 11:37:17.000000000 +0100
|
|
+++ system-config-printer-1.3.7/asyncipp.py 2011-10-17 10:52:52.844802724 +0100
|
|
@@ -379,8 +379,14 @@ class _IPPAuthOperation:
|
|
forbidden = False
|
|
if type (exc) == cups.IPPError:
|
|
(e, m) = exc.args
|
|
+ try:
|
|
+ ipp_auth_canceled = cups.IPP_AUTHENTICATION_CANCELED
|
|
+ except AttributeError:
|
|
+ # requires pycups 1.9.60
|
|
+ ipp_auth_canceled = 4096
|
|
if (e == cups.IPP_NOT_AUTHORIZED or
|
|
- e == cups.IPP_FORBIDDEN):
|
|
+ e == cups.IPP_FORBIDDEN or
|
|
+ e == ipp_auth_canceled):
|
|
forbidden = (e == cups.IPP_FORBIDDEN)
|
|
elif e == cups.IPP_SERVICE_UNAVAILABLE:
|
|
return self._reconnect_error (conn, exc)
|
|
diff -up system-config-printer-1.3.7/authconn.py.auth system-config-printer-1.3.7/authconn.py
|
|
--- system-config-printer-1.3.7/authconn.py.auth 2011-09-26 16:39:20.000000000 +0100
|
|
+++ system-config-printer-1.3.7/authconn.py 2011-10-17 10:52:34.736129998 +0100
|
|
@@ -1,6 +1,6 @@
|
|
#!/usr/bin/python
|
|
|
|
-## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc.
|
|
+## Copyright (C) 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
|
## Author: Tim Waugh <twaugh@redhat.com>
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
@@ -241,8 +241,15 @@ class Connection:
|
|
except cups.IPPError, (e, m):
|
|
if self._use_pk and m == 'pkcancel':
|
|
raise cups.IPPError (0, _("Operation canceled"))
|
|
+ try:
|
|
+ ipp_auth_canceled = cups.IPP_AUTHENTICATION_CANCELED
|
|
+ except AttributeError:
|
|
+ # requires pycups 1.9.60
|
|
+ ipp_auth_canceled = 4096
|
|
+
|
|
if not self._cancel and (e == cups.IPP_NOT_AUTHORIZED or
|
|
- e == cups.IPP_FORBIDDEN):
|
|
+ e == cups.IPP_FORBIDDEN or
|
|
+ e == ipp_auth_canceled):
|
|
self._failed (e == cups.IPP_FORBIDDEN)
|
|
elif not self._cancel and e == cups.IPP_SERVICE_UNAVAILABLE:
|
|
if self._lock:
|
|
@@ -264,6 +271,7 @@ class Connection:
|
|
if self._cancel and not self._cannot_auth:
|
|
raise cups.IPPError (0, _("Operation canceled"))
|
|
|
|
+ debugprint ("%s: %s" % (e, m))
|
|
raise
|
|
except cups.HTTPError, (s,):
|
|
if not self._cancel:
|