1👍
Your code looks fine to me. I have used try-except-else blocks in a lot of projects and it has saved me a lot of pain. I am no expert in Python so I’m not sure if there are better ways of doing this, but this code should be good enough.
Source:stackexchange.com