Blame 0001-use-gettext-instead-of-lgettext-in-all-python-script.patch

7a4635b
From 6cac02cec6f457e4ab4edca8cebe2cda8dc4061d Mon Sep 17 00:00:00 2001
7a4635b
From: Matej Habrnal <mhabrnal@redhat.com>
7a4635b
Date: Wed, 22 Jul 2015 15:22:31 +0200
7a4635b
Subject: [PATCH] use gettext instead of lgettext in all python scripts
7a4635b
7a4635b
This is related to the transition from Python2 to Python3.
7a4635b
7a4635b
lgettext returns an array of bytes but we require string (because of Python3).
7a4635b
Without this patch the scripts exit with 'TypeError' exception ('must be str,
7a4635b
not bytes').
7a4635b
7a4635b
Related to rhbz#1245600
7a4635b
7a4635b
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
7a4635b
---
7a4635b
 src/daemon/abrt-handle-upload.in                        | 2 +-
7a4635b
 src/plugins/abrt-action-analyze-core.in                 | 2 +-
7a4635b
 src/plugins/abrt-action-analyze-vmcore.in               | 2 +-
7a4635b
 src/plugins/abrt-action-check-oops-for-alt-component.in | 2 +-
7a4635b
 src/plugins/abrt-action-check-oops-for-hw-error.in      | 2 +-
7a4635b
 src/plugins/abrt-action-install-debuginfo.in            | 2 +-
7a4635b
 src/plugins/abrt-action-perform-ccpp-analysis.in        | 2 +-
7a4635b
 src/plugins/abrt-action-ureport                         | 2 +-
7a4635b
 src/plugins/abrt-gdb-exploitable                        | 2 +-
7a4635b
 9 files changed, 9 insertions(+), 9 deletions(-)
7a4635b
7a4635b
diff --git a/src/daemon/abrt-handle-upload.in b/src/daemon/abrt-handle-upload.in
7a4635b
index dc630bc..3db6561 100755
7a4635b
--- a/src/daemon/abrt-handle-upload.in
7a4635b
+++ b/src/daemon/abrt-handle-upload.in
7a4635b
@@ -18,7 +18,7 @@ GETTEXT_PROGNAME = "abrt"
7a4635b
 import locale
7a4635b
 import gettext
7a4635b
 
7a4635b
-_ = lambda x: gettext.lgettext(x)
7a4635b
+_ = lambda x: gettext.gettext(x)
7a4635b
 
7a4635b
 def init_gettext():
7a4635b
     try:
7a4635b
diff --git a/src/plugins/abrt-action-analyze-core.in b/src/plugins/abrt-action-analyze-core.in
7a4635b
index 486994a..448bdab 100644
7a4635b
--- a/src/plugins/abrt-action-analyze-core.in
7a4635b
+++ b/src/plugins/abrt-action-analyze-core.in
7a4635b
@@ -12,7 +12,7 @@ GETTEXT_PROGNAME = "@PACKAGE@"
7a4635b
 import locale
7a4635b
 import gettext
7a4635b
 
7a4635b
-_ = lambda x: gettext.lgettext(x)
7a4635b
+_ = lambda x: gettext.gettext(x)
7a4635b
 
7a4635b
 
7a4635b
 verbose = 0
7a4635b
diff --git a/src/plugins/abrt-action-analyze-vmcore.in b/src/plugins/abrt-action-analyze-vmcore.in
7a4635b
index c3ae071..c91737f 100644
7a4635b
--- a/src/plugins/abrt-action-analyze-vmcore.in
7a4635b
+++ b/src/plugins/abrt-action-analyze-vmcore.in
7a4635b
@@ -14,7 +14,7 @@ GETTEXT_PROGNAME = "abrt"
7a4635b
 import locale
7a4635b
 import gettext
7a4635b
 
7a4635b
-_ = lambda x: gettext.lgettext(x)
7a4635b
+_ = lambda x: gettext.gettext(x)
7a4635b
 
7a4635b
 def init_gettext():
7a4635b
     try:
7a4635b
diff --git a/src/plugins/abrt-action-check-oops-for-alt-component.in b/src/plugins/abrt-action-check-oops-for-alt-component.in
7a4635b
index 3dce42e..b5152c1 100644
7a4635b
--- a/src/plugins/abrt-action-check-oops-for-alt-component.in
7a4635b
+++ b/src/plugins/abrt-action-check-oops-for-alt-component.in
7a4635b
@@ -9,7 +9,7 @@ import re
7a4635b
 
7a4635b
 GETTEXT_PROGNAME = "abrt"
7a4635b
 
7a4635b
-_ = gettext.lgettext
7a4635b
+_ = gettext.gettext
7a4635b
 
7a4635b
 tags = [
7a4635b
 "WARNING:",
7a4635b
diff --git a/src/plugins/abrt-action-check-oops-for-hw-error.in b/src/plugins/abrt-action-check-oops-for-hw-error.in
7a4635b
index ff8ff5d..400ed99 100644
7a4635b
--- a/src/plugins/abrt-action-check-oops-for-hw-error.in
7a4635b
+++ b/src/plugins/abrt-action-check-oops-for-hw-error.in
7a4635b
@@ -9,7 +9,7 @@ import re
7a4635b
 
7a4635b
 GETTEXT_PROGNAME = "abrt"
7a4635b
 
7a4635b
-_ = gettext.lgettext
7a4635b
+_ = gettext.gettext
7a4635b
 
7a4635b
 def file_has_string(filename, string):
7a4635b
     try:
7a4635b
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
7a4635b
index ed453df..f70ebcd 100644
7a4635b
--- a/src/plugins/abrt-action-install-debuginfo.in
7a4635b
+++ b/src/plugins/abrt-action-install-debuginfo.in
7a4635b
@@ -26,7 +26,7 @@ GETTEXT_PROGNAME = "abrt"
7a4635b
 import locale
7a4635b
 import gettext
7a4635b
 
7a4635b
-_ = lambda x: gettext.lgettext(x)
7a4635b
+_ = lambda x: gettext.gettext(x)
7a4635b
 
7a4635b
 def init_gettext():
7a4635b
     try:
7a4635b
diff --git a/src/plugins/abrt-action-perform-ccpp-analysis.in b/src/plugins/abrt-action-perform-ccpp-analysis.in
7a4635b
index fd75fd4..c25de96 100644
7a4635b
--- a/src/plugins/abrt-action-perform-ccpp-analysis.in
7a4635b
+++ b/src/plugins/abrt-action-perform-ccpp-analysis.in
7a4635b
@@ -19,7 +19,7 @@ from reportclient import (ask_yes_no_yesforever,
7a4635b
 
7a4635b
 GETTEXT_PROGNAME = "abrt"
7a4635b
 
7a4635b
-_ = gettext.lgettext
7a4635b
+_ = gettext.gettext
7a4635b
 
7a4635b
 def handle_event(event_name, problem_dir):
7a4635b
     """Helper function handling a single event
7a4635b
diff --git a/src/plugins/abrt-action-ureport b/src/plugins/abrt-action-ureport
7a4635b
index 1c63749..75e5c62 100755
7a4635b
--- a/src/plugins/abrt-action-ureport
7a4635b
+++ b/src/plugins/abrt-action-ureport
7a4635b
@@ -17,7 +17,7 @@ GETTEXT_PROGNAME = "abrt"
7a4635b
 import locale
7a4635b
 import gettext
7a4635b
 
7a4635b
-_ = lambda x: gettext.lgettext(x)
7a4635b
+_ = lambda x: gettext.gettext(x)
7a4635b
 
7a4635b
 def init_gettext():
7a4635b
     try:
7a4635b
diff --git a/src/plugins/abrt-gdb-exploitable b/src/plugins/abrt-gdb-exploitable
7a4635b
index cfdf293..758c4c5 100755
7a4635b
--- a/src/plugins/abrt-gdb-exploitable
7a4635b
+++ b/src/plugins/abrt-gdb-exploitable
7a4635b
@@ -14,7 +14,7 @@ import locale
7a4635b
 import gdb
7a4635b
 
7a4635b
 GETTEXT_PROGNAME = "abrt"
7a4635b
-_ = gettext.lgettext
7a4635b
+_ = gettext.gettext
7a4635b
 
7a4635b
 def init_gettext():
7a4635b
     try:
7a4635b
-- 
7a4635b
2.4.6
7a4635b