This made a funky diff, but I literally just put a try-except around the whole thing and tabbed in the code.