rusackas commented on code in PR #41465:
URL: https://github.com/apache/superset/pull/41465#discussion_r3486180272


##########
scripts/translations/build_translation_index.py:
##########
@@ -86,7 +86,17 @@ def build_index(translations_dir: Path) -> dict[str, Any]:
 
     for lang in langs:
         po_path = translations_dir / lang / "LC_MESSAGES" / "messages.po"
-        cat = polib.pofile(str(po_path))
+        try:
+            cat = polib.pofile(str(po_path))
+        except OSError as exc:

Review Comment:
   Good catch — broadened it to `(OSError, UnicodeDecodeError)` since a 
bad-encoding catalog raises the latter, with a test covering that path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to