Hello community,
here is the log from the commit of package system-config-printer for
openSUSE:Factory checked in at 2018-06-02 11:56:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/system-config-printer (Old)
and /work/SRC/openSUSE:Factory/.system-config-printer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "system-config-printer"
Sat Jun 2 11:56:00 2018 rev:90 rq:613437 version:1.5.7
Changes:
--------
---
/work/SRC/openSUSE:Factory/system-config-printer/system-config-printer.changes
2018-04-25 09:44:29.947927185 +0200
+++
/work/SRC/openSUSE:Factory/.system-config-printer.new/system-config-printer.changes
2018-06-02 11:56:01.431470993 +0200
@@ -1,0 +2,8 @@
+Thu May 31 10:20:19 UTC 2018 - [email protected]
+
+- Add 0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch.
+ This fixes an error message when adding a new printer since the code
+ was finding out the language by using LC_MESSAGES which wasn't set
+ and then it was extracting the first element of a None value.
+
+-------------------------------------------------------------------
New:
----
0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ system-config-printer.spec ++++++
--- /var/tmp/diff_new_pack.ot13Sm/_old 2018-06-02 11:56:05.571319184 +0200
+++ /var/tmp/diff_new_pack.ot13Sm/_new 2018-06-02 11:56:05.575319038 +0200
@@ -41,6 +41,8 @@
Patch22: system-config-printer-no-params-to-py3.patch
# PATCH-FIX-UPSTREAM fix_connect_dialog_focus.diff
gh#twaugh/system-config-printer#38 [email protected] -- Allow to set the focus
on a connect dialog combobox so the user can edit its contents
Patch24: fix_connect_dialog_focus.diff
+# PATCH-FIX-UPSTREAM
0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch
gh#twaugh/system-config-printer#108 [email protected] -- Fix language usage
when LC_MESSAGES is not set (which is the default)
+Patch25: 0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch
# PATCH-FEATURE-OPENSUSE system-config-printer-no-simple-gui.patch boo#1090189
[email protected] -- Remove unused _simple_gui class in openprinting.py.
Pulls in GTK
Patch100: system-config-printer-no-simple-gui.patch
# For directory ownership
@@ -165,6 +167,7 @@
%patch21 -p1
%patch22 -p1
%patch24 -p1
+%patch25 -p1
%patch100 -p1
%build
++++++ 0001-Fallback-to-using-LC_CTYPE-if-LC_MESSAGES-is-empty-a.patch ++++++
>From f52f192d241f49334aa46dca1fe9c22b2ee37ff3 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <[email protected]>
Date: Thu, 31 May 2018 12:07:19 +0200
Subject: [PATCH] Fallback to using LC_CTYPE if LC_MESSAGES is empty and fix
_language use
On openSUSE, LC_MESSAGES is not set by default, so fallback to LC_CTYPE in
that case.
Also, self._language is not a list (unlike in other classes) but the language
itself, so if we get the first element, we would be getting the first letter,
not the language.
---
scp-dbus-service.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scp-dbus-service.py b/scp-dbus-service.py
index 1338836b..b3c03217 100644
--- a/scp-dbus-service.py
+++ b/scp-dbus-service.py
@@ -471,6 +471,8 @@ class ConfigPrinting(dbus.service.Object):
self._jobappletpath = None
self._ppds = None
self._language = locale.getlocale (locale.LC_MESSAGES)[0]
+ if not self._language:
+ self._language = locale.getlocale (locale.LC_CTYPE)[0]
def destroy (self):
self._cupsconn.destroy ()
@@ -511,7 +513,7 @@ class ConfigPrinting(dbus.service.Object):
def GetBestDrivers(self, device_id, device_make_and_model, device_uri,
reply_handler, error_handler):
GetBestDriversRequest (device_id, device_make_and_model, device_uri,
- self._cupsconn, self._language[0],
+ self._cupsconn, self._language,
reply_handler, error_handler)
@dbus.service.method(dbus_interface=CONFIG_IFACE,
--
2.17.0