mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
do not crash when returned system encoding is None
This commit is contained in:
parent
13dc98795f
commit
4ec6958e33
2
fdroid
2
fdroid
@ -137,7 +137,7 @@ def main():
|
|||||||
mod = __import__('fdroidserver.' + command, None, None, [command])
|
mod = __import__('fdroidserver.' + command, None, None, [command])
|
||||||
|
|
||||||
system_langcode, system_encoding = locale.getdefaultlocale()
|
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 "
|
logging.warn(_("Encoding is set to '{enc}' fdroid might run "
|
||||||
"into encoding issues. Please set it to 'UTF-8' "
|
"into encoding issues. Please set it to 'UTF-8' "
|
||||||
"for best results.".format(enc=system_encoding)))
|
"for best results.".format(enc=system_encoding)))
|
||||||
|
Loading…
Reference in New Issue
Block a user