Closed ptoews closed 3 years ago
I encountered a nationality number that's not listed in the respective enum, however I have no clue which nationality it refers to. The number is 78. I would suggest that the nationality enum is accessed with a fallback default value since more nationalities might appear in the future, e.g. instead of https://github.com/EmperorCookie/accapi/blob/6cdfcb9c974b9d5422d4ce0f1122d3009a73b7c6/src/accapi/structs.py#L174
nationality = args.pop(0) self.nationality = NATIONALITY.get(nationality, f"Unknown ({nationality})")
Edit: Forgot to mention that this caused a KeyError that shut everything down
Will fix but will also accept PR if you get to it before me.
I encountered a nationality number that's not listed in the respective enum, however I have no clue which nationality it refers to. The number is 78. I would suggest that the nationality enum is accessed with a fallback default value since more nationalities might appear in the future, e.g. instead of https://github.com/EmperorCookie/accapi/blob/6cdfcb9c974b9d5422d4ce0f1122d3009a73b7c6/src/accapi/structs.py#L174
Edit: Forgot to mention that this caused a KeyError that shut everything down