From: Johannes Segitz <jsegitz@suse.de>
To: selinux@vger.kernel.org
Subject: [PATCH] python/chcat: Don't fail on missing translation files
Date: Mon, 12 Sep 2022 09:40:43 +0200 [thread overview]
Message-ID: <20220912074043.GB5803@suse.com> (raw)
Exception handling was not in line with other files, causing chcat to
fail if translation files were not available
Signed-off-by: Johannes Segitz <jsegitz@suse.de>
---
python/chcat/chcat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/chcat/chcat b/python/chcat/chcat
index e779fcc6..1b93e99b 100755
--- a/python/chcat/chcat
+++ b/python/chcat/chcat
@@ -40,7 +40,7 @@ try:
localedir="/usr/share/locale",
**kwargs)
_ = t.gettext
-except ImportError:
+except:
try:
import builtins
builtins.__dict__['_'] = str
--
2.35.3
next reply other threads:[~2022-09-12 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 7:40 Johannes Segitz [this message]
2022-09-12 12:51 ` [PATCH] python/chcat: Don't fail on missing translation files Daniel Burgener
2022-09-12 13:06 ` Johannes Segitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220912074043.GB5803@suse.com \
--to=jsegitz@suse.de \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.