fix: handle non value for post lang

This commit is contained in:
Callum Leslie authored and GitHub committed 2022-07-06 20:08:45 +00:00
1 parent aa660be510
commit 71eca69912
1 file changed
+1 -1
+1 -1
View File
@@ -37,7 +37,7 @@ def name_normalize(name: str) -> str:
name = re.sub(r"\/", r"", name)
lang = settings.config["reddit"]["thread"]["post_lang"]
if lang != "":
if lang:
print_substep("Translating filename...")
translated_name = ts.google(name, to_language = lang)
return translated_name