From 4ec6958e33bc6448a28566081cc4300c3dca4cc6 Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Fri, 30 Aug 2019 19:45:23 +0200 Subject: [PATCH] do not crash when returned system encoding is None --- fdroid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroid b/fdroid index b316346a..59fc69a0 100755 --- a/fdroid +++ b/fdroid @@ -137,7 +137,7 @@ def main(): mod = __import__('fdroidserver.' + command, None, None, [command]) system_langcode, system_encoding = locale.getdefaultlocale() - if system_encoding.lower() not in ('utf-8', 'utf8'): + if system_encoding is None or system_encoding.lower() not in ('utf-8', 'utf8'): logging.warn(_("Encoding is set to '{enc}' fdroid might run " "into encoding issues. Please set it to 'UTF-8' " "for best results.".format(enc=system_encoding)))