Skip to content
Snippets Groups Projects
Verified Commit 15d79f59 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Coherce empty locale to string

parent 67fe9193
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ from typing import Optional
def normalise_locale(loc: str, enc: Optional[str] = None) -> str:
loc = locale_alias.get(loc, loc)
loc = locale_alias.get(loc, loc) or ""
if loc:
if enc:
enc = locale_encoding_alias.get(enc.replace("-", ""), enc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment