mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Get rid of unicode warning
This commit is contained in:
parent
a23f02dbab
commit
64596bc166
2 changed files with 2 additions and 2 deletions
|
@ -452,7 +452,7 @@ class Diagnoser():
|
||||||
key = "diagnosis_description_" + id_
|
key = "diagnosis_description_" + id_
|
||||||
descr = m18n.n(key)
|
descr = m18n.n(key)
|
||||||
# If no description available, fallback to id
|
# If no description available, fallback to id
|
||||||
return descr if descr != key else id_
|
return descr if descr.decode('utf-8') != key else id_
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def i18n(report, force_remove_html_tags=False):
|
def i18n(report, force_remove_html_tags=False):
|
||||||
|
|
|
@ -354,7 +354,7 @@ def _get_and_format_service_status(service, infos):
|
||||||
# that mean that we don't have a translation for this string
|
# that mean that we don't have a translation for this string
|
||||||
# that's the only way to test for that for now
|
# that's the only way to test for that for now
|
||||||
# if we don't have it, uses the one provided by systemd
|
# if we don't have it, uses the one provided by systemd
|
||||||
if description == translation_key:
|
if description.decode('utf-8') == translation_key:
|
||||||
description = str(raw_status.get("Description", ""))
|
description = str(raw_status.get("Description", ""))
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue