Skip to content

Remove too early metadata language definition without try-except block#292

Open
HoLuLuLu wants to merge 1 commit intojkwill87:mainfrom
HoLuLuLu:fix/mnamer-language-exception
Open

Remove too early metadata language definition without try-except block#292
HoLuLuLu wants to merge 1 commit intojkwill87:mainfrom
HoLuLuLu:fix/mnamer-language-exception

Conversation

@HoLuLuLu
Copy link
Copy Markdown

Fixes: #289

Changes explaination:

  • definition of self.metadata.language throws MnamerException if path_data.get("language") is not a valid language (in my case it was the German word "und", which means "and" and is not a language reference at all)
  • later if condition isn't necessary because self.metadata.language will never be set before
  • try-except block used makes sure that path_data.get("language") can be converted to a Language, otherwise the metadata language will not be set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mnamer crashed

1 participant