Blame SOURCES/system-config-printer-utf8-971548.patch

0a882b
diff -up system-config-printer-1.4.1/asyncipp.py.utf8-971548 system-config-printer-1.4.1/asyncipp.py
0a882b
--- system-config-printer-1.4.1/asyncipp.py.utf8-971548	2013-06-07 11:13:02.040050636 +0100
0a882b
+++ system-config-printer-1.4.1/asyncipp.py	2013-06-07 11:13:19.561149594 +0100
0a882b
@@ -575,7 +575,7 @@ class _IPPAuthOperation:
0a882b
         d.set_default_response (Gtk.ResponseType.OK)
0a882b
         d.connect ("response", self._on_retry_server_error_response)
0a882b
         debugprint ("%s (_reconnect_error): presenting error dialog (%s; %s)" %
0a882b
-                    (self, msg, message))
0a882b
+                    (self, repr (msg), repr (message)))
0a882b
         d.show ()
0a882b
 
0a882b
     def _on_retry_server_error_response (self, dialog, response):
0a882b
@@ -688,11 +688,11 @@ if __name__ == "__main__":
0a882b
                                            error_handler=self.connect_failed)
0a882b
 
0a882b
         def connected (self, conn, result):
0a882b
-            debugprint ("Success: %s" % result)
0a882b
+            debugprint ("Success: %s" % repr (result))
0a882b
             self.get_devices_button.set_sensitive (True)
0a882b
 
0a882b
         def connect_failed (self, conn, exc):
0a882b
-            debugprint ("Exc %s" % exc)
0a882b
+            debugprint ("Exc %s" % repr (exc))
0a882b
             self.get_devices_button.set_sensitive (False)
0a882b
             self.conn.destroy ()
0a882b
 
0a882b
@@ -707,7 +707,7 @@ if __name__ == "__main__":
0a882b
                 debugprint ("Ignoring stale reply")
0a882b
                 return
0a882b
 
0a882b
-            debugprint ("Got devices: %s" % result)
0a882b
+            debugprint ("Got devices: %s" % repr (result))
0a882b
             self.get_devices_button.set_sensitive (True)
0a882b
 
0a882b
         def get_devices_error (self, conn, exc):
0a882b
@@ -715,7 +715,7 @@ if __name__ == "__main__":
0a882b
                 debugprint ("Ignoring stale error")
0a882b
                 return
0a882b
 
0a882b
-            debugprint ("Error getting devices: %s" % exc)
0a882b
+            debugprint ("Error getting devices: %s" % repr (exc))
0a882b
             self.get_devices_button.set_sensitive (True)
0a882b
 
0a882b
     UI ()
0a882b
diff -up system-config-printer-1.4.1/asyncpk1.py.utf8-971548 system-config-printer-1.4.1/asyncpk1.py
0a882b
--- system-config-printer-1.4.1/asyncpk1.py.utf8-971548	2013-06-07 11:13:02.034050602 +0100
0a882b
+++ system-config-printer-1.4.1/asyncpk1.py	2013-06-07 11:13:19.562149604 +0100
0a882b
@@ -84,7 +84,7 @@ class _PK1AsyncMethodCall:
0a882b
                         error_handler=self._pk_error_handler,
0a882b
                         timeout=3600)
0a882b
         except TypeError, e:
0a882b
-            debugprint ("Type error in PK call: %s" % e)
0a882b
+            debugprint ("Type error in PK call: %s" % repr (e))
0a882b
             self.call_fallback_fn ()
0a882b
 
0a882b
     def _destroy (self):
0a882b
@@ -120,7 +120,7 @@ class _PK1AsyncMethodCall:
0a882b
             self._destroy ()
0a882b
             return
0a882b
 
0a882b
-        debugprint ("PolicyKit method failed with: %s" % repr (str (error)))
0a882b
+        debugprint ("PolicyKit method failed with: %s" % repr (error))
0a882b
         self.call_fallback_fn ()
0a882b
 
0a882b
     def _pk_error_handler (self, exc):
0a882b
@@ -144,7 +144,7 @@ class _PK1AsyncMethodCall:
0a882b
             return
0a882b
 
0a882b
         debugprint ("PolicyKit call to %s did not work: %s" %
0a882b
-                    (self._pk_method_name, exc))
0a882b
+                    (self._pk_method_name, repr (exc)))
0a882b
         self.call_fallback_fn ()
0a882b
 
0a882b
     def call_fallback_fn (self):
0a882b
@@ -270,7 +270,7 @@ class PK1Connection:
0a882b
                     break
0a882b
 
0a882b
             except Exception, e:
0a882b
-                debugprint ("Exception assessing DevicesGet API: %s" % e)
0a882b
+                debugprint ("Exception assessing DevicesGet API: %s" % repr (e))
0a882b
 
0a882b
         methodtype = type (self._conn.getPrinters)
0a882b
         bindings = []
0a882b
diff -up system-config-printer-1.4.1/authconn.py.utf8-971548 system-config-printer-1.4.1/authconn.py
0a882b
--- system-config-printer-1.4.1/authconn.py.utf8-971548	2013-05-09 12:10:43.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/authconn.py	2013-06-07 11:13:19.562149604 +0100
0a882b
@@ -1,6 +1,6 @@
0a882b
 #!/usr/bin/python
0a882b
 
0a882b
-## Copyright (C) 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
0a882b
+## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2013 Red Hat, Inc.
0a882b
 ## Author: Tim Waugh <twaugh@redhat.com>
0a882b
 
0a882b
 ## This program is free software; you can redistribute it and/or modify
0a882b
@@ -271,7 +271,7 @@ class Connection:
0a882b
                     if self._cancel and not self._cannot_auth:
0a882b
                         raise cups.IPPError (0, _("Operation canceled"))
0a882b
 
0a882b
-                    debugprint ("%s: %s" % (e, m))
0a882b
+                    debugprint ("%s: %s" % (e, repr (m)))
0a882b
                     raise
0a882b
             except cups.HTTPError, (s,):
0a882b
                 if not self._cancel:
0a882b
diff -up system-config-printer-1.4.1/cupshelpers/cupshelpers.py.utf8-971548 system-config-printer-1.4.1/cupshelpers/cupshelpers.py
0a882b
--- system-config-printer-1.4.1/cupshelpers/cupshelpers.py.utf8-971548	2013-06-07 11:13:02.025050551 +0100
0a882b
+++ system-config-printer-1.4.1/cupshelpers/cupshelpers.py	2013-06-07 11:13:19.562149604 +0100
0a882b
@@ -701,7 +701,8 @@ def copyPPDOptions(ppd1, ppd2):
0a882b
             for choice in new_option.choices:
0a882b
                 if choice["choice"]==value:
0a882b
                     ppd2.markOption(new_option.keyword, value)
0a882b
-                    _debugprint ("set %s = %s" % (new_option.keyword, value))
0a882b
+                    _debugprint ("set %s = %s" % (repr (new_option.keyword),
0a882b
+                                                  repr (value)))
0a882b
                     
0a882b
 def setPPDPageSize(ppd, language):
0a882b
     """
0a882b
@@ -722,9 +723,9 @@ def setPPDPageSize(ppd, language):
0a882b
             size = 'Letter'
0a882b
     try:
0a882b
         ppd.markOption ('PageSize', size)
0a882b
-        _debugprint ("set PageSize = %s" % size)
0a882b
+        _debugprint ("set PageSize = %s" % repr (size))
0a882b
     except:
0a882b
-        _debugprint ("Failed to set PageSize (%s not available?)" % size)
0a882b
+        _debugprint ("Failed to set PageSize (%s not available?)" % repr (size))
0a882b
 
0a882b
 def missingExecutables(ppd):
0a882b
     """
0a882b
@@ -750,10 +751,10 @@ def missingExecutables(ppd):
0a882b
             return "true"
0a882b
         if name[0] == '/':
0a882b
             if os.access (name, os.X_OK):
0a882b
-                _debugprint ("%s: found" % name)
0a882b
+                _debugprint ("%s: found" % repr (name))
0a882b
                 return name
0a882b
             else:
0a882b
-                _debugprint ("%s: NOT found" % name)
0a882b
+                _debugprint ("%s: NOT found" % repr (name))
0a882b
                 return None
0a882b
         if name.find ("=") != -1:
0a882b
             return "builtin"
0a882b
@@ -768,9 +769,9 @@ def missingExecutables(ppd):
0a882b
         for component in path.split (':'):
0a882b
             file = component.rstrip (os.path.sep) + os.path.sep + name
0a882b
             if os.access (file, os.X_OK):
0a882b
-                _debugprint ("%s: found" % file)
0a882b
+                _debugprint ("%s: found" % repr (file))
0a882b
                 return file
0a882b
-        _debugprint ("%s: NOT found in %s" % (name,path))
0a882b
+        _debugprint ("%s: NOT found in %s" % (repr (name), repr (path)))
0a882b
         return None
0a882b
 
0a882b
     exes_to_install = []
0a882b
diff -up system-config-printer-1.4.1/cupspk.py.utf8-971548 system-config-printer-1.4.1/cupspk.py
0a882b
--- system-config-printer-1.4.1/cupspk.py.utf8-971548	2013-05-09 12:10:43.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/cupspk.py	2013-06-07 11:13:19.562149604 +0100
0a882b
@@ -1,6 +1,6 @@
0a882b
 # vim: set ts=4 sw=4 et: coding=UTF-8
0a882b
 #
0a882b
-# Copyright (C) 2008 Novell, Inc.
0a882b
+# Copyright (C) 2008, 2013 Novell, Inc.
0a882b
 # Copyright (C) 2008, 2009, 2010, 2012 Red Hat, Inc.
0a882b
 # Copyright (C) 2008, 2009, 2010, 2012 Tim Waugh <twaugh@redhat.com>
0a882b
 #
0a882b
@@ -141,7 +141,7 @@ class Connection:
0a882b
         # exception that wasn't handled, or an error in the mechanism itself)
0a882b
         if pk_retval != '':
0a882b
             debugprint ('PolicyKit call to %s did not work: %s' %
0a882b
-                        (pk_function_name, pk_retval))
0a882b
+                        (pk_function_name, repr (pk_retval)))
0a882b
             return fallback_function(*args, **kwds)
0a882b
 
0a882b
 
0a882b
diff -up system-config-printer-1.4.1/dnssdresolve.py.utf8-971548 system-config-printer-1.4.1/dnssdresolve.py
0a882b
--- system-config-printer-1.4.1/dnssdresolve.py.utf8-971548	2013-05-09 12:10:43.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/dnssdresolve.py	2013-06-07 11:13:19.563149612 +0100
0a882b
@@ -1,6 +1,6 @@
0a882b
 #!/usr/bin/python
0a882b
 
0a882b
-## Copyright (C) 2010, 2011, 2012 Red Hat, Inc.
0a882b
+## Copyright (C) 2010, 2011, 2012, 2013 Red Hat, Inc.
0a882b
 ## Authors:
0a882b
 ##  Tim Waugh <twaugh@redhat.com>
0a882b
 
0a882b
@@ -75,7 +75,7 @@ class DNSSDHostNamesResolver:
0a882b
                 server = dbus.Interface (obj,
0a882b
                                          "org.freedesktop.Avahi.Server")
0a882b
                 self._device_uri_by_name[(name, stype, domain)] = uri
0a882b
-                debugprint ("Resolving address for %s" % hostname)
0a882b
+                debugprint ("Resolving address for %s" % repr (hostname))
0a882b
                 server.ResolveService (-1, -1,
0a882b
                                         name, stype, domain,
0a882b
                                         -1, 0,
0a882b
@@ -83,7 +83,7 @@ class DNSSDHostNamesResolver:
0a882b
                                         error_handler=lambda e:
0a882b
                                             self._error (uri, e))
0a882b
             except dbus.DBusException, e:
0a882b
-                debugprint ("Failed to resolve address: %s" % e)
0a882b
+                debugprint ("Failed to resolve address: %s" % repr (e))
0a882b
                 self._resolved ()
0a882b
 
0a882b
     def _resolved (self):
0a882b
@@ -107,7 +107,7 @@ class DNSSDHostNamesResolver:
0a882b
         self._resolved ()
0a882b
 
0a882b
     def _error (self, uri, error):
0a882b
-        debugprint ("Error resolving %s: %s" % (uri, error))
0a882b
+        debugprint ("Error resolving %s: %s" % (uri, repr (error)))
0a882b
         self._resolved ()
0a882b
 
0a882b
 if __name__ == '__main__':
0a882b
diff -up system-config-printer-1.4.1/jobviewer.py.utf8-971548 system-config-printer-1.4.1/jobviewer.py
0a882b
--- system-config-printer-1.4.1/jobviewer.py.utf8-971548	2013-06-07 11:13:02.041050641 +0100
0a882b
+++ system-config-printer-1.4.1/jobviewer.py	2013-06-07 11:13:19.563149612 +0100
0a882b
@@ -957,7 +957,8 @@ class JobViewer (GtkGUI):
0a882b
                         ind = auth_info_required.index ('password')
0a882b
                         auth_info[ind] = items[0].secret
0a882b
                     else:
0a882b
-                        debugprint ("gnomekeyring: look-up result %s" % result)
0a882b
+                        debugprint ("gnomekeyring: look-up result %s" %
0a882b
+                                    repr (result))
0a882b
 
0a882b
                 if try_keyring and c == None:
0a882b
                     try:
0a882b
@@ -1092,7 +1093,8 @@ class JobViewer (GtkGUI):
0a882b
                                                                    val)
0a882b
                     id = gnomekeyring.item_create_sync (keyring, type, name,
0a882b
                                                         attrs, secret, True)
0a882b
-                    debugprint ("keyring: created id %d for %s" % (id, name))
0a882b
+                    debugprint ("keyring: created id %d for %s" % (repr (id),
0a882b
+                                                                   repr (name)))
0a882b
             except:
0a882b
                 nonfatalException ()
0a882b
 
0a882b
@@ -1833,7 +1835,8 @@ class JobViewer (GtkGUI):
0a882b
             for attr, value in jobdata.iteritems ():
0a882b
                 if not self.jobs[jobid].has_key (attr):
0a882b
                     self.jobs[jobid][attr] = value
0a882b
-                    debugprint ("Add %s=%s (my job)" % (attr, value))
0a882b
+                    debugprint ("Add %s=%s (my job)" % (repr (attr),
0a882b
+                                                        repr (value)))
0a882b
 
0a882b
         # If we failed to get required attributes for the job, bail.
0a882b
         if not self.jobiters.has_key (jobid):
0a882b
diff -up system-config-printer-1.4.1/newprinter.py.utf8-971548 system-config-printer-1.4.1/newprinter.py
0a882b
--- system-config-printer-1.4.1/newprinter.py.utf8-971548	2013-06-07 11:13:02.038050624 +0100
0a882b
+++ system-config-printer-1.4.1/newprinter.py	2013-06-07 11:13:19.564149619 +0100
0a882b
@@ -186,7 +186,7 @@ def download_gpg_fingerprint(url):
0a882b
     try:
0a882b
         c.perform()
0a882b
     except pycurl.error as e:
0a882b
-        debugprint('Cannot retrieve %s: %s' % (url, str(e)))
0a882b
+        debugprint('Cannot retrieve %s: %s' % (url, repr (e)))
0a882b
         return None
0a882b
 
0a882b
     keyid_re = re.compile(' ((?:(?:[0-9A-F]{4})(?:\s+|$)){2})$', re.M)
0a882b
@@ -898,7 +898,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
             debugprint('No packages for driver')
0a882b
             return False
0a882b
         if len(arches) > 1:
0a882b
-            debugprint('Returned more than one matching architecture, please report this as a bug: %s', str(arches))
0a882b
+            debugprint('Returned more than one matching architecture, please report this as a bug: %s', repr (arches))
0a882b
             return False
0a882b
 
0a882b
         pkgs = pkgs[arches[0]]
0a882b
@@ -933,14 +933,18 @@ class NewPrinterGUI(GtkGUI):
0a882b
 
0a882b
         repo = pkgs[pkg].get('repositories', {}).get(self.packageinstaller)
0a882b
         if not repo:
0a882b
-            debugprint('Local package system %s not found in %s',
0a882b
-                          self.packageinstaller, pkgs[pkg].get('repositories', {}))
0a882b
+            debugprint('Local package system %s not found in %s' %
0a882b
+                       (self.packageinstaller,
0a882b
+                        repr (pkgs[pkg].get('repositories', {}))))
0a882b
             return False
0a882b
 
0a882b
         if onlycheckpresence:
0a882b
             return True
0a882b
 
0a882b
-        debugprint('Installing driver: "%s"; Repo: "%s"; Key ID: "%s"' % (name, repo, keyid))
0a882b
+        debugprint('Installing driver: %s; Repo: %s; Key ID: %s' %
0a882b
+                   (repr (name),
0a882b
+                    repr (repo),
0a882b
+                    repr (keyid)))
0a882b
 
0a882b
         fmt = _("Installing driver %s" % name)
0a882b
         self._installdialog = Gtk.MessageDialog (parent=self.NewPrinterWindow,
0a882b
@@ -2521,7 +2525,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
         for char in origtext:
0a882b
             if char not in allowed_chars:
0a882b
                 new_text = new_text.replace(char, "")
0a882b
-                debugprint ("removed disallowed character %s" % char)
0a882b
+                debugprint ("removed disallowed character %s" % repr (char))
0a882b
         if origtext!=new_text:
0a882b
             entry.set_text(new_text)
0a882b
 
0a882b
@@ -2958,7 +2962,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
         if text.find (":") != -1:
0a882b
             # The user is typing in a URI.  In that case, switch to URI entry.
0a882b
             ent.set_text ('')
0a882b
-            debugprint ("URI detected (%s) -> Enter URI" % text)
0a882b
+            debugprint ("URI detected (%s) -> Enter URI" % repr (text))
0a882b
             self.entNPTDevice.set_text (text)
0a882b
             model = self.tvNPDevices.get_model ()
0a882b
             path = model.get_path (self.devices_uri_iter)
0a882b
@@ -3146,7 +3150,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
         label = self.btnNPDownloadableDriverSearch_label
0a882b
         label.set_text (_("Searching"))
0a882b
         searchterm = self.entNPDownloadableDriverSearch.get_text ()
0a882b
-        debugprint ('Searching for "%s"' % searchterm)
0a882b
+        debugprint ('Searching for "%s"' % repr (searchterm))
0a882b
         self.drivers_lock.acquire ()
0a882b
         self.openprinting_query_handle = \
0a882b
             self.openprinting.searchPrinters (searchterm,
0a882b
@@ -3742,7 +3746,7 @@ class NewPrinterGUI(GtkGUI):
0a882b
                             os.unlink(ppdname)
0a882b
 
0a882b
         except RuntimeError, e:
0a882b
-            debugprint ("RuntimeError: " + str(e))
0a882b
+            debugprint ("RuntimeError: " + repr (e))
0a882b
             if self.rbtnNPFoomatic.get_active():
0a882b
                 # Foomatic database problem of some sort.
0a882b
                 err_title = _('Database error')
0a882b
diff -up system-config-printer-1.4.1/ppdcache.py.utf8-971548 system-config-printer-1.4.1/ppdcache.py
0a882b
--- system-config-printer-1.4.1/ppdcache.py.utf8-971548	2013-05-09 12:10:44.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/ppdcache.py	2013-06-07 11:13:19.564149619 +0100
0a882b
@@ -1,6 +1,6 @@
0a882b
 #!/usr/bin/python
0a882b
 
0a882b
-## Copyright (C) 2010, 2011, 2012 Red Hat, Inc.
0a882b
+## Copyright (C) 2010, 2011, 2012, 2013 Red Hat, Inc.
0a882b
 ## Authors:
0a882b
 ##  Tim Waugh <twaugh@redhat.com>
0a882b
 
0a882b
@@ -73,7 +73,7 @@ class PPDCache:
0a882b
 
0a882b
                 return
0a882b
 
0a882b
-            debugprint ("%s: fetch PPD for %s" % (self, name))
0a882b
+            debugprint ("%s: fetch PPD for %s" % (self, repr (name)))
0a882b
             self._cups.getPPD3 (name,
0a882b
                                 reply_handler=lambda c, r:
0a882b
                                     self._got_ppd3 (c, name, r, callback),
0a882b
@@ -188,8 +188,8 @@ if __name__ == "__main__":
0a882b
 
0a882b
     def signal (name, result, exc):
0a882b
         debugprint ("**** %s" % name)
0a882b
-        debugprint (result)
0a882b
-        debugprint (exc)
0a882b
+        debugprint (repr (result))
0a882b
+        debugprint (repr (exc))
0a882b
 
0a882b
     c = cups.Connection ()
0a882b
     printers = c.getPrinters ()
0a882b
diff -up system-config-printer-1.4.1/ppdsloader.py.utf8-971548 system-config-printer-1.4.1/ppdsloader.py
0a882b
--- system-config-printer-1.4.1/ppdsloader.py.utf8-971548	2013-05-09 12:10:44.000000000 +0100
0a882b
+++ system-config-printer-1.4.1/ppdsloader.py	2013-06-07 11:13:19.564149619 +0100
0a882b
@@ -222,7 +222,7 @@ class PPDsLoader(GObject.GObject):
0a882b
                                          error_handler=self._packagekit_error,
0a882b
                                          timeout=3600)
0a882b
         except Exception, e:
0a882b
-            debugprint ("Failed to talk to PackageKit: %s" % e)
0a882b
+            debugprint ("Failed to talk to PackageKit: %s" % repr (e))
0a882b
             if self._dialog:
0a882b
                 self._dialog.show_all ()
0a882b
                 self._query_cups ()
0a882b
@@ -235,7 +235,7 @@ class PPDsLoader(GObject.GObject):
0a882b
             self._query_cups ()
0a882b
 
0a882b
     def _packagekit_error (self, exc):
0a882b
-        debugprint ("Got PackageKit error: %s" % exc)
0a882b
+        debugprint ("Got PackageKit error: %s" % repr (exc))
0a882b
         if self._dialog:
0a882b
             self._dialog.show_all ()
0a882b
             self._query_cups ()
0a882b
@@ -262,7 +262,7 @@ class PPDsLoader(GObject.GObject):
0a882b
         self._query_cups ()
0a882b
 
0a882b
     def _jockey_error (self, exc):
0a882b
-        debugprint ("Got Jockey error: %s" % exc)
0a882b
+        debugprint ("Got Jockey error: %s" % repr (exc))
0a882b
         if self._need_requery_cups:
0a882b
             self._query_cups ()
0a882b
         else: