mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
More encode/decode fixes
This commit is contained in:
parent
d5da3d899a
commit
1ac59f9877
3 changed files with 4 additions and 4 deletions
|
@ -177,11 +177,11 @@ class BackupRestoreTargetsManager(object):
|
||||||
or (exclude and isinstance(exclude, list) and not include)
|
or (exclude and isinstance(exclude, list) and not include)
|
||||||
|
|
||||||
if include:
|
if include:
|
||||||
return [target.encode("Utf-8") for target in self.targets[category]
|
return [target for target in self.targets[category]
|
||||||
if self.results[category][target] in include]
|
if self.results[category][target] in include]
|
||||||
|
|
||||||
if exclude:
|
if exclude:
|
||||||
return [target.encode("Utf-8") for target in self.targets[category]
|
return [target for target in self.targets[category]
|
||||||
if self.results[category][target] not in exclude]
|
if self.results[category][target] not in exclude]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -638,7 +638,7 @@ def _get_status(domain):
|
||||||
cert_subject = cert.get_subject().CN
|
cert_subject = cert.get_subject().CN
|
||||||
cert_issuer = cert.get_issuer().CN
|
cert_issuer = cert.get_issuer().CN
|
||||||
organization_name = cert.get_issuer().O
|
organization_name = cert.get_issuer().O
|
||||||
valid_up_to = datetime.strptime(cert.get_notAfter(), "%Y%m%d%H%M%SZ")
|
valid_up_to = datetime.strptime(cert.get_notAfter().decode('utf-8'), "%Y%m%d%H%M%SZ")
|
||||||
days_remaining = (valid_up_to - datetime.utcnow()).days
|
days_remaining = (valid_up_to - datetime.utcnow()).days
|
||||||
|
|
||||||
if cert_issuer == _name_self_CA():
|
if cert_issuer == _name_self_CA():
|
||||||
|
|
|
@ -451,7 +451,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.decode('utf-8') != key else id_
|
return descr if descr != key else id_
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def i18n(report, force_remove_html_tags=False):
|
def i18n(report, force_remove_html_tags=False):
|
||||||
|
|
Loading…
Add table
Reference in a new issue