diff --git a/metadata_extract/meteor.py b/metadata_extract/meteor.py index 3fd747b..fad8a42 100644 --- a/metadata_extract/meteor.py +++ b/metadata_extract/meteor.py @@ -29,9 +29,7 @@ def __default_detect(text: str) -> Optional[str]: lang = langdetect.detect(text) except LangDetectException: return None - if not isinstance(lang, str): - raise RuntimeError(f"Unexpected type for detected language: {type(lang)}") - if lang == "unknown": + if not isinstance(lang, str) or lang == "unknown": return None return lang